Closed amal-khailtash closed 3 years ago
It seems this had been mentioned before in Issue #2, but I don't see a resolution, but somehow the error went away. Maybe some manual renaming of generated filenames were done?
Good point. This project was motivated by the systemrdl-compiler project, where I combined the lexer & parser in a single grammar file. It shouldn't be too difficult to extend support for this to support grammars that are split across files.
On this same note. It would be great if you could support lexer only grammars as well. I have one that I just use ANTLR4 lexer only grammar.
Just published v1.1.0. This adds support for grammars that are split into separate lexer/parser files. See example: https://github.com/amykyta3/speedy-antlr-example/blob/master/src/spam/parser/generate_parsers_split.sh
Regarding the lexer-only request, I have opened a separate issue here: #6
This is great. I confirm this fixes the separate grammars. Thanks.
This is great tool! Quite helpful creating a faster parser with Python binding.
It seems though as this does not support separate lexer/parser grammars. When separate lexer/parser grammar files are used I see the following problem.
I have a grammar for a parser named A with the following file/grammar names:
ANTLR4 Python3 target generates these python files:
ANTLR4 Cpp target generates these cpp files:
Running speedy_antlr_tool.generate and passing AParser.py as argument generates:
It seems the templates require a visitor header file with the name ABaseVisitor.h, but the CPP source includes a header named: AParserBaseVisitor.cpp:.