/* Generated from:
* f83d884147747f2d8f5a62eebc4ccd07d71b6b34e5ba1a8d7559526ad864dc97 perly.y
- * 1b401b34e1842dd8814919ea427f1b13abc479699495e6e88f8fe4c7ab2f838f regen_perly.pl
+ * 40aee1e96522879ab043fac10286df9e97b2db0197ad63dc6946ae7a61444afb regen_perly.pl
* ex: set ro: */
# define YY_NULLPTR NULL
#endif
+#ifndef YY_CAST
+# ifdef __cplusplus
+# define YY_CAST(Type, Val) static_cast<Type> (Val)
+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
+# else
+# define YY_CAST(Type, Val) ((Type) (Val))
+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+# define YY_ATTRIBUTE_UNUSED
+# endif
+#endif
+
/* contains all the parser state tables; auto-generated from perly.y */
#include "perly.tab"
/* Generated from:
* f83d884147747f2d8f5a62eebc4ccd07d71b6b34e5ba1a8d7559526ad864dc97 perly.y
- * 1b401b34e1842dd8814919ea427f1b13abc479699495e6e88f8fe4c7ab2f838f regen_perly.pl
+ * 40aee1e96522879ab043fac10286df9e97b2db0197ad63dc6946ae7a61444afb regen_perly.pl
* ex: set ro: */
/* Generated from:
* f83d884147747f2d8f5a62eebc4ccd07d71b6b34e5ba1a8d7559526ad864dc97 perly.y
- * 1b401b34e1842dd8814919ea427f1b13abc479699495e6e88f8fe4c7ab2f838f regen_perly.pl
+ * 40aee1e96522879ab043fac10286df9e97b2db0197ad63dc6946ae7a61444afb regen_perly.pl
* ex: set ro: */
# Don't change this to add new bison versions without testing that the generated
# files actually work :-) Win32 in particular may not like them. :-(
-unless ($version =~ /\b(2\.[4567]|3\.[0-4])\b/) { die <<EOF; }
+unless ($version =~ /\b(2\.[4567]|3\.[0-7])\b/) { die <<EOF; }
You have the wrong version of bison in your path; currently versions
-2.4-2.7 or 3.0-3.4 are known to work. Try installing
+2.4-2.7 or 3.0-3.7 are known to work. Try installing
http://ftp.gnu.org/gnu/bison/bison-3.3.tar.gz
or similar. Your bison identifies itself as:
exit 0;
-# extract the tables and actions from the generated .c file
+# extract the symbol kinds, tables and actions from the generated .c file
sub extract {
my $clines = shift;
my $tablines;
my $actlines;
+ # extract the symbol kind table if it exists
+ $clines =~ m@
+ (?:
+ ^/\* \s* Symbol \s+ kind\. \s* \*/\n
+ )?
+ enum \s+ yysymbol_kind_t \s* \{
+ .*?
+ \} \s* ;\n
+ typedef \s+ enum \s+ \w+ \s+ \w+ ; \n+
+ @xms
+ and $tablines .= $&;
+
my $last_table = $version >= 3 ? 'yyr2' : 'yystos';
$clines =~ m@
(?:
}\s*; # end of last table
@xms
or die "Can't extract tables from $tmpc_file\n";
- $tablines = $&;
+ $tablines .= $&;
# extract all the cases in the big action switch statement
/xsm
or die "Can't extract yytname[] from table string\n";
my $fields = $1;
- $fields =~ s{"([^"]+)"}
+ $fields =~ s{"((?:[^"\\]|\\.)+)"}
{ "toketype_" .
(defined $tokens{$1} ? $tokens{$1} : $default_token)
}ge;