All Questions
3 questions
0
votes
1
answer
601
views
Antlr Parser Testing Python
I have created a Datalog parser using Antlr. I am not sure how to proceed. I want to generate the AST
Antlr has generated the following files:
Lexer.py
Listener.py
Lexer.tokens
Parser.py
Program....
2
votes
1
answer
1k
views
How to generate AST(abstract syntax tree) for Python source code using antlr
Grammar for python is given on antlr site but on using it to generate AST its giving error. I am using same procedure as for java grammar which generated AST .
Errors:
> C:\testpython>java -...
1
vote
1
answer
1k
views
How to get the AST-tree instead of a list when parsing in Python with ANTLR?
I get simple antlr3 grammar MicroXpath and build lexer and parser for Python.
Then I wrote a simple test code:
import antlr3
from XPathLexer import XPathLexer
from XPathParser import XPathParser
...