diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-09-12 01:35:30 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-09-12 01:35:30 +0200 |
| commit | e72e20e025ab14320c79c2dca75721a0a5e002bd (patch) | |
| tree | 3b2d0d90f38c80442ee518e000b4026e753c66c9 /boot/parser.yy | |
| parent | 2d3ba9b352478e5a3d3add482f56f1c801965428 (diff) | |
| download | elna-e72e20e025ab14320c79c2dca75721a0a5e002bd.tar.gz | |
Allow random text after ending the module
Diffstat (limited to 'boot/parser.yy')
| -rw-r--r-- | boot/parser.yy | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/boot/parser.yy b/boot/parser.yy index cc0a46c..f97d545 100644 --- a/boot/parser.yy +++ b/boot/parser.yy @@ -45,6 +45,8 @@ along with GCC; see the file COPYING3. If not see { public: yy::location location; + /// Where the comment being scanned was opened. + yy::location comment_start; lexer(std::istream& arg_yyin) : yyFlexLexer(&arg_yyin) @@ -167,12 +169,16 @@ along with GCC; see the file COPYING3. If not see program: import_part type_part variable_part procedure_part "end" "." { + driver.finished = true; + boot::unit *tree = new boot::unit(boot::make_position(@$), $1, $2, $3, $4); driver.tree.reset(tree); } | import_part type_part variable_part procedure_part "program" "(" optional_identifiers ")" procedure_body "end" "." { + driver.finished = true; + boot::unit *tree = new boot::unit(boot::make_position(@$), $1, $2, $3, $4, std::move($7), boot::make_position(@5), std::move(*$9)); driver.tree.reset(tree); |
