Skip to content

Commit

Permalink
Use epilogue_declaration instead of epilogue
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Jul 30, 2024
1 parent 7330823 commit 028c43a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions lib/lrama/parser.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Lrama::Parser

rule

input: prologue_declaration* bison_declaration* "%%" rules_or_grammar_declaration+ epilogue?
input: prologue_declaration* bison_declaration* "%%" rules_or_grammar_declaration+ epilogue_declaration?

prologue_declaration: "%{"
{
Expand Down Expand Up @@ -387,16 +387,16 @@ rule

named_ref: '[' IDENTIFIER ']' { result = val[1].s_value }

epilogue: "%%"
{
begin_c_declaration('\Z')
@grammar.epilogue_first_lineno = @lexer.line + 1
}
C_DECLARATION
{
end_c_declaration
@grammar.epilogue = val[2].s_value
}
epilogue_declaration: "%%"
{
begin_c_declaration('\Z')
@grammar.epilogue_first_lineno = @lexer.line + 1
}
C_DECLARATION
{
end_c_declaration
@grammar.epilogue = val[2].s_value
}

variable: id

Expand Down

0 comments on commit 028c43a

Please sign in to comment.