diff options
| author | Albert Magyar | 2019-11-04 12:34:13 -0800 |
|---|---|---|
| committer | mergify[bot] | 2019-11-04 20:34:13 +0000 |
| commit | 8f108c1aa8cac656da56b2505519db47080d5a26 (patch) | |
| tree | 63bbe70175c9af57f08f7864ddfb3cb4298c9a8c /src/main | |
| parent | 4c3c7e328e41f289ec37aee85a5d4d15c7b18189 (diff) | |
Add explicit EOF to top-level parser rule (#1217)
* Fixes #1154
* Tests that #1154 example produces SyntaxErrorsException
* Generally helps catch trailing syntax errors
* Performance-neutral relative to previous grammar
* Recommended by antlr4 devs, can help performance in some cases
* See antlr/antlr4#1540
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/antlr4/FIRRTL.g4 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/antlr4/FIRRTL.g4 b/src/main/antlr4/FIRRTL.g4 index 518cb698..0035423b 100644 --- a/src/main/antlr4/FIRRTL.g4 +++ b/src/main/antlr4/FIRRTL.g4 @@ -29,7 +29,7 @@ import firrtl.LexerHelper; // Does there have to be at least one module? circuit - : 'circuit' id ':' info? INDENT module* DEDENT + : 'circuit' id ':' info? INDENT module* DEDENT EOF ; module |
