antlr4
antlr4 copied to clipboard
ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
Closes #3876
The following grammar: ``` logic : NOT logic | logic ( AND logic )+ | logic ( OR logic )+ | expr | L_PAREN logic R_PAREN ; ``` produces a...
This aligns the golang runtime with other languages where the SetTokenSource is publicly available. We require this in our usage of antlr4. We currently have a fork for the sole...
I've been analyzing https://github.com/antlr/grammars-v4/issues/4465. Apparently, the Antlr tool is inserting an epsilon transition with non-existent action *arbitrarily for the first alt* of a rule that has direct left recursion. This...
```bash > mkdir -p a_dir/build > cd a_dir > cat > A.g4 java -classpath /usr/share/java/antlr4/antlr4.jar:/usr/share/java/antlr3-runtime.jar:/usr/share/java/antlr4/antlr4-runtime.jar:/usr/share/java/stringtemplate4/ST4.jar:/usr/share/java/treelayout/org.abego.treelayout.core.jar org.antlr.v4.Tool -o here ../A.g4 context [/report CANNOT_WRITE_FILE] 1:19 attribute arg isn't defined error(1): cannot write...
This commit optimizes the performance of the GetTextFromInterval method when a single SQL text is too large
I wrote a grammar file, and when parsing a file of around 20MB, it temporarily consumes over 2GB of memory. The memory usage returns to normal after parsing is complete....
Expanding #4450 to include visitor too. Closes #4737.
Found a typo while learning the internals of ANTLR.