diff --git a/lib/lrama/parser.rb b/lib/lrama/parser.rb index 328de1cf..843090ae 100644 --- a/lib/lrama/parser.rb +++ b/lib/lrama/parser.rb @@ -1,14 +1,13 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.7.1 -# from Racc grammar file "". +# This file is automatically generated by Racc 1.7.2 +# from Racc grammar file "parser.y". # ###### racc/parser.rb begin unless $".find {|p| p.end_with?('/racc/parser.rb')} $".push "#{__dir__}/racc/parser.rb" self.class.module_eval(<<'...end racc/parser.rb/module_eval...', 'racc/parser.rb', 1) -# frozen_string_literal: false #-- # Copyright (c) 1999-2006 Minero Aoki # @@ -22,17 +21,6 @@ unless $".find {|p| p.end_with?('/racc/info.rb')} $".push "#{__dir__}/racc/info.rb" -#-- -# -# -# -# Copyright (c) 1999-2006 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the same terms of ruby. -# see the file "COPYING". -# -#++ module Racc VERSION = '1.7.1' @@ -84,10 +72,12 @@ class ParseError < StandardError; end # [-v, --verbose] # verbose mode. create +filename+.output file, like yacc's y.output file. # [-g, --debug] -# add debug code to parser class. To display debuggin information, +# add debug code to parser class. To display debugging information, # use this '-g' option and set @yydebug true in parser class. # [-E, --embedded] # Output parser which doesn't need runtime files (racc/parser.rb). +# [-F, --frozen] +# Output parser which declares frozen_string_literals: true # [-C, --check-only] # Check syntax of racc grammar file and quit. # [-S, --output-status] @@ -566,7 +556,7 @@ def _racc_do_reduce(arg, act) # # If this method returns, parsers enter "error recovering mode". def on_error(t, val, vstack) - raise ParseError, sprintf("\nparse error on value %s (%s)", + raise ParseError, sprintf("parse error on value %s (%s)", val.inspect, token_to_str(t) || '?') end