From b86423b52504afa3a3c54dd412b5493753dafdae Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 26 Aug 2023 11:06:24 +0900 Subject: [PATCH] Embed grammar file name into generated file --- bin/racc | 1 + test/regress/cadenza | 2 +- test/regress/cast | 2 +- test/regress/csspool | 2 +- test/regress/edtf | 2 +- test/regress/frozen | 2 +- test/regress/huia | 2 +- test/regress/journey | 2 +- test/regress/liquor | 2 +- test/regress/machete | 2 +- test/regress/mediacloth | 2 +- test/regress/mof | 2 +- test/regress/namae | 2 +- test/regress/nasl | 2 +- test/regress/nokogiri-css | 2 +- test/regress/opal | 2 +- test/regress/php_serialization | 2 +- test/regress/riml | 2 +- test/regress/ruby18 | 2 +- test/regress/ruby22 | 2 +- test/regress/tp_plus | 2 +- test/regress/twowaysql | 2 +- 22 files changed, 22 insertions(+), 21 deletions(-) diff --git a/bin/racc b/bin/racc index 5c6b046b..717c9307 100755 --- a/bin/racc +++ b/bin/racc @@ -154,6 +154,7 @@ def main $stderr.puts 'Creating parser file...' if verbose params = result.params.dup + params.filename = File.basename(input) # Overwrites parameters given by a grammar file with command line options. params.superclass = superclass if superclass params.omit_action_call = true if omit_action_call diff --git a/test/regress/cadenza b/test/regress/cadenza index ab8b5c7f..a6864645 100644 --- a/test/regress/cadenza +++ b/test/regress/cadenza @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "cadenza.y". # require 'racc/parser.rb' diff --git a/test/regress/cast b/test/regress/cast index 58f1818c..4afcd91f 100644 --- a/test/regress/cast +++ b/test/regress/cast @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "cast.y". # require 'racc/parser.rb' diff --git a/test/regress/csspool b/test/regress/csspool index caf6cb3e..cfe04812 100644 --- a/test/regress/csspool +++ b/test/regress/csspool @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "csspool.y". # require 'racc/parser.rb' diff --git a/test/regress/edtf b/test/regress/edtf index 2b2cfd58..4eccb8ef 100644 --- a/test/regress/edtf +++ b/test/regress/edtf @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "edtf.y". # require 'racc/parser.rb' diff --git a/test/regress/frozen b/test/regress/frozen index b8d69c82..e1d7df0a 100644 --- a/test/regress/frozen +++ b/test/regress/frozen @@ -2,7 +2,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "frozen.y". # require 'racc/parser.rb' diff --git a/test/regress/huia b/test/regress/huia index 121cbe1d..45103689 100644 --- a/test/regress/huia +++ b/test/regress/huia @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "huia.y". # require 'racc/parser.rb' diff --git a/test/regress/journey b/test/regress/journey index 4cc0dcd6..82d34c90 100644 --- a/test/regress/journey +++ b/test/regress/journey @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "journey.y". # require 'racc/parser.rb' diff --git a/test/regress/liquor b/test/regress/liquor index dec215fd..c9975f05 100644 --- a/test/regress/liquor +++ b/test/regress/liquor @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "liquor.y". # require 'racc/parser.rb' diff --git a/test/regress/machete b/test/regress/machete index 2659a3ec..6c47398e 100644 --- a/test/regress/machete +++ b/test/regress/machete @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "machete.y". # require 'racc/parser.rb' diff --git a/test/regress/mediacloth b/test/regress/mediacloth index 2d9958f9..6ef008f6 100644 --- a/test/regress/mediacloth +++ b/test/regress/mediacloth @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "mediacloth.y". # require 'racc/parser.rb' diff --git a/test/regress/mof b/test/regress/mof index afbf8cf2..c649c32e 100644 --- a/test/regress/mof +++ b/test/regress/mof @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "mof.y". # require 'racc/parser.rb' diff --git a/test/regress/namae b/test/regress/namae index 289abc5f..03e4a38d 100644 --- a/test/regress/namae +++ b/test/regress/namae @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "namae.y". # require 'racc/parser.rb' diff --git a/test/regress/nasl b/test/regress/nasl index 4be095fd..cab52c72 100644 --- a/test/regress/nasl +++ b/test/regress/nasl @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "nasl.y". # require 'racc/parser.rb' diff --git a/test/regress/nokogiri-css b/test/regress/nokogiri-css index 713a75fb..6244edae 100644 --- a/test/regress/nokogiri-css +++ b/test/regress/nokogiri-css @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "nokogiri-css.y". # require 'racc/parser.rb' diff --git a/test/regress/opal b/test/regress/opal index 0f3ed225..675830de 100644 --- a/test/regress/opal +++ b/test/regress/opal @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "opal.y". # require 'racc/parser.rb' diff --git a/test/regress/php_serialization b/test/regress/php_serialization index b55d75a3..3a98023c 100644 --- a/test/regress/php_serialization +++ b/test/regress/php_serialization @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "php_serialization.y". # require 'racc/parser.rb' diff --git a/test/regress/riml b/test/regress/riml index ce24c1c7..494b1673 100644 --- a/test/regress/riml +++ b/test/regress/riml @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "riml.y". # require 'racc/parser.rb' diff --git a/test/regress/ruby18 b/test/regress/ruby18 index 669ab244..f0d42371 100644 --- a/test/regress/ruby18 +++ b/test/regress/ruby18 @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "ruby18.y". # require 'racc/parser.rb' diff --git a/test/regress/ruby22 b/test/regress/ruby22 index 9eec38fd..b752e786 100644 --- a/test/regress/ruby22 +++ b/test/regress/ruby22 @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "ruby22.y". # require 'racc/parser.rb' diff --git a/test/regress/tp_plus b/test/regress/tp_plus index e57f3163..c4366872 100644 --- a/test/regress/tp_plus +++ b/test/regress/tp_plus @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "tp_plus.y". # require 'racc/parser.rb' diff --git a/test/regress/twowaysql b/test/regress/twowaysql index 9bdd7723..9b14c9a9 100644 --- a/test/regress/twowaysql +++ b/test/regress/twowaysql @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.5.2 -# from Racc grammar file "". +# from Racc grammar file "twowaysql.y". # require 'racc/parser.rb'