diff options
Diffstat (limited to 'lib/qparser/parser.mly')
-rw-r--r-- | lib/qparser/parser.mly | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/qparser/parser.mly b/lib/qparser/parser.mly index 73d77b7..6fc9b8f 100644 --- a/lib/qparser/parser.mly +++ b/lib/qparser/parser.mly @@ -25,7 +25,7 @@ main: | before_location* - LOCATION_START + start_location EOL+ instructions = line_statement* LOCATION_END @@ -38,6 +38,13 @@ before_location: | EOL {} | COMMENT EOL { } +(* Defer the registration here, and ensure we get a valid rule. *) +start_location: + | l = LOCATION_START + { + ignore (l ()) + } + (* All these statement should terminate with EOL *) line_statement: | COMMENT EOL+ { Analyzer.Instruction.comment $loc } |