K
K
Karponter2015-09-21 13:30:17
PHP
Karponter, 2015-09-21 13:30:17

What libraries would you recommend for parsing source code?

Essence of the question:
You need to parse the source code and build a tree of code tokens.
The input is: myprogramm.txt
The output is a hierarchical code structure with the name of the tokens, their parameters, nested tokens, etc.
Parsing languages: C++, Java, PHP (all together or separately)
Platform: anything that can be done on a unix server, even bash! ^_^

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2015-09-21
@Nipheris

Strange question - it makes sense to use language-specific parsers.
In principle, if you only need parsing into a tree, try taking ANTLR and grammars of known languages: https://github.com/antlr/grammars-v4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question