Reasonable first cut at adding XML markup around bison tokens and grammar rules
authorNick Downing <downing.nick@gmail.com>
Thu, 14 Jun 2018 23:54:18 +0000 (09:54 +1000)
committerNick Downing <downing.nick@gmail.com>
Thu, 14 Jun 2018 23:54:18 +0000 (09:54 +1000)
13 files changed:
.gitignore [new file with mode: 0644]
Makefile.patch [new file with mode: 0644]
n.sh [new file with mode: 0755]
src/parse-gram.c
src/parse-gram.c.patch [new file with mode: 0644]
src/parse-gram.h
src/parse-gram.y
src/reader.c
src/scan-code.c
src/scan-gram.c
src/scan-gram.c.patch [new file with mode: 0644]
src/scan-gram.l
src/scan-skel.c

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..71d30da
--- /dev/null
@@ -0,0 +1,70 @@
+*.a
+*.la
+*.lo
+*.o
+Makefile
+Makefile.orig
+config.log
+config.status
+doc/yacc.1
+etc/bench.pl
+examples/calc++/.deps/
+examples/calc++/calc++-driver.cc
+examples/calc++/calc++-driver.hh
+examples/calc++/calc++-parser.yy
+examples/calc++/calc++-scanner.ll
+examples/calc++/calc++.cc
+examples/extracted.stamp
+examples/mfcalc/.deps/
+examples/mfcalc/calc.h
+examples/mfcalc/mfcalc.y
+examples/rpcalc/.deps/
+examples/rpcalc/rpcalc.y
+javacomp.sh
+javaexec.sh
+lib/.deps/
+lib/.dirstamp
+lib/alloca.h
+lib/charset.alias
+lib/config.h
+lib/configmake.h
+lib/fcntl.h
+lib/glthread/.deps/
+lib/glthread/.dirstamp
+lib/inttypes.h
+lib/limits.h
+lib/math.h
+lib/ref-add.sed
+lib/ref-del.sed
+lib/signal.h
+lib/spawn.h
+lib/stamp-h1
+lib/stddef.h
+lib/stdint.h
+lib/stdio.h
+lib/stdlib.h
+lib/string.h
+lib/sys/
+lib/time.h
+lib/unistd.h
+lib/unitypes.h
+lib/uniwidth.h
+lib/uniwidth/.deps/
+lib/uniwidth/.dirstamp
+lib/wchar.h
+lib/wctype.h
+po/Makefile
+po/Makefile.in
+po/POTFILES
+runtime-po/Makefile
+runtime-po/Makefile.in
+runtime-po/POTFILES
+src/.deps/
+src/.dirstamp
+src/bison
+src/parse-gram.c.orig
+src/scan-gram.c.orig
+src/yacc
+tests/atconfig
+tests/atlocal
+tests/bison
diff --git a/Makefile.patch b/Makefile.patch
new file mode 100644 (file)
index 0000000..495f4f4
--- /dev/null
@@ -0,0 +1,20 @@
+--- Makefile.orig      2018-06-14 17:15:39.883992817 +1000
++++ Makefile   2018-06-15 08:19:19.705578624 +1000
+@@ -4309,6 +4309,8 @@
+ .l.c:
+       $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
++      cp $@ $@.orig
++      patch $@ <$@.patch
+ .ll.cc:
+       $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
+@@ -4319,6 +4321,8 @@
+ .y.c:
+       $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)
++      cp $@ $@.orig
++      patch $@ <$@.patch
+ examples/mfcalc/mfcalc.c: examples/mfcalc/mfcalc.y
+       $(AM_V_YACC) \
diff --git a/n.sh b/n.sh
new file mode 100755 (executable)
index 0000000..727c699
--- /dev/null
+++ b/n.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+./configure
+cp Makefile Makefile.orig
+patch Makefile <Makefile.patch
+
index 6d4105a..1b709b3 100644 (file)
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 3.0.4.38-1047-dirty.  */
+/* A Bison parser, made by GNU Bison 3.0.5.  */
 
 /* Bison implementation for Yacc-like parsers in C
 
@@ -44,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "3.0.4.38-1047-dirty"
+#define YYBISON_VERSION "3.0.5"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -129,7 +129,7 @@ extern int gram_debug;
     param_parse  = 1 << 1,
     param_both   = param_lex | param_parse
   } param_type;
-#line 647 "src/parse-gram.y" /* yacc.c:355  */
+#line 672 "src/parse-gram.y" /* yacc.c:355  */
 #include "muscle-tab.h"
 
 #line 136 "src/parse-gram.c" /* yacc.c:355  */
@@ -221,9 +221,9 @@ symbol_list *list;
 named_ref *named_ref;
 #line 241 "src/parse-gram.y" /* yacc.c:355  */
 param_type param;
-#line 409 "src/parse-gram.y" /* yacc.c:355  */
+#line 417 "src/parse-gram.y" /* yacc.c:355  */
 code_props_type code_type;
-#line 649 "src/parse-gram.y" /* yacc.c:355  */
+#line 674 "src/parse-gram.y" /* yacc.c:355  */
 
   struct
   {
@@ -619,18 +619,18 @@ static const yytype_uint8 yytranslate[] =
   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   264,   264,   273,   274,   278,   279,   285,   289,   294,
-     295,   300,   306,   307,   308,   309,   314,   319,   320,   321,
-     322,   323,   324,   324,   325,   326,   350,   351,   352,   353,
-     357,   358,   367,   368,   369,   373,   385,   389,   393,   401,
-     412,   413,   423,   424,   430,   442,   442,   447,   447,   452,
-     463,   478,   479,   480,   481,   485,   486,   491,   493,   498,
-     503,   513,   515,   520,   521,   525,   526,   530,   531,   532,
-     537,   542,   547,   553,   559,   570,   571,   580,   581,   587,
-     588,   589,   596,   596,   604,   605,   606,   611,   614,   616,
-     618,   620,   622,   624,   626,   631,   632,   642,   643,   668,
-     669,   670,   671,   683,   685,   694,   699,   700,   705,   713,
-     714
+       0,   264,   264,   281,   282,   286,   287,   293,   297,   302,
+     303,   308,   314,   315,   316,   317,   322,   327,   328,   329,
+     330,   331,   332,   332,   333,   334,   358,   359,   360,   361,
+     365,   366,   375,   376,   377,   381,   393,   397,   401,   409,
+     420,   421,   431,   432,   438,   450,   450,   455,   455,   460,
+     471,   486,   487,   488,   489,   493,   494,   499,   501,   506,
+     511,   521,   523,   528,   529,   533,   534,   538,   539,   540,
+     545,   550,   555,   561,   567,   578,   579,   588,   589,   595,
+     596,   602,   609,   609,   621,   626,   631,   636,   639,   641,
+     643,   645,   647,   649,   651,   656,   657,   667,   668,   693,
+     694,   695,   696,   708,   710,   719,   724,   725,   730,   738,
+     739
 };
 #endif
 
@@ -1091,7 +1091,7 @@ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvalue
         break;
 
     case 65: /* code_props_type  */
-#line 410 "src/parse-gram.y" /* yacc.c:684  */
+#line 418 "src/parse-gram.y" /* yacc.c:684  */
       { fprintf (yyo, "%s", code_props_type_string (((*yyvaluep).code_type))); }
 #line 1097 "src/parse-gram.c" /* yacc.c:684  */
         break;
@@ -1115,7 +1115,7 @@ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvalue
         break;
 
     case 89: /* value  */
-#line 658 "src/parse-gram.y" /* yacc.c:684  */
+#line 683 "src/parse-gram.y" /* yacc.c:684  */
       {
   switch (((*yyvaluep).value).kind)
     {
@@ -1742,6 +1742,25 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio
 | yyparse.  |
 `----------*/
 
+extern char piece_temp[];
+extern char *piece[];
+extern int piece0, piece1;
+void insert_piece(int n, const void *str);
+int piece2, piece3;
+static void peek(int *yychar_p, YYSTYPE *yylval_p, YYLTYPE *yylloc_p) {
+ if (*yychar_p == YYEMPTY)
+  *yychar_p = yylex(yylval_p, yylloc_p);
+ memmove(piece + piece3 + 3, piece + piece3 + 1, (piece1 - piece3 - 1) * sizeof(char *));
+ piece[piece3 + 1] = strdup("");
+ piece[piece3 + 2] = strdup("");
+ piece3 += 2;
+ piece0 += 2;
+ piece1 += 2;
+}
+#define insert_before(n, str) \
+ do { insert_piece(piece2 + (n) * 2, (str)); ++piece3; } while (0)
+#define insert_after(n, str) \
+ do { insert_piece(piece2 + (n) * 2 + 1, (str)); ++piece3; } while (0)
 int
 yyparse (void)
 {
@@ -2026,6 +2045,17 @@ yydefault:
 yyreduce:
   /* yyn is the number of a rule to reduce with.  */
   yylen = yyr2[yyn];
+ int n = ((int)(yyvsp - yyvsa) - yylen) * 2;
+ piece2 = n + 1;
+ piece3 = n + yylen * 2;
+ if (yylen == 0) {
+  memmove(piece + n + 2, piece + n, (piece1 - n) * sizeof(char *));
+  piece[n] = strdup("");
+  piece[n + 1] = strdup("");
+  piece3 = n + 2;
+  piece0 += 2;
+  piece1 += 2;
+ }
 
   /* If YYLEN is nonzero, implement the default value of the action:
      '$$ = $1'.
@@ -2045,144 +2075,157 @@ yyreduce:
     int yychar_backup = yychar;
     switch (yyn)
       {
-          case 6:
-#line 280 "src/parse-gram.y" /* yacc.c:1648  */
+          case 2:
+#line 265 "src/parse-gram.y" /* yacc.c:1648  */
+    {
+ insert_after(3, "</root>");
+ insert_after(2, "</Sect2>");
+ insert_before(2, "<Sect2>");
+ insert_after(0, "</Sect1>");
+ insert_before(0, "<Sect1>");
+ insert_before(0, "<root>");
+ }
+#line 2059 "src/parse-gram.c" /* yacc.c:1648  */
+    break;
+
+  case 6:
+#line 288 "src/parse-gram.y" /* yacc.c:1648  */
     {
       muscle_code_grow (union_seen ? "post_prologue" : "pre_prologue",
                         translate_code ((yyvsp[0].code), (yylsp[0]), true), (yylsp[0]));
       code_scanner_last_string_free ();
     }
-#line 2056 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2069 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 7:
-#line 286 "src/parse-gram.y" /* yacc.c:1648  */
+#line 294 "src/parse-gram.y" /* yacc.c:1648  */
     {
       muscle_percent_define_ensure ((yyvsp[0].uniqstr), (yylsp[0]), true);
     }
-#line 2064 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2077 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 8:
-#line 290 "src/parse-gram.y" /* yacc.c:1648  */
+#line 298 "src/parse-gram.y" /* yacc.c:1648  */
     {
       muscle_percent_define_insert ((yyvsp[-1].uniqstr), (yylsp[-1]), (yyvsp[0].value).kind, (yyvsp[0].value).chars,
                                     MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
     }
-#line 2073 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2086 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 9:
-#line 294 "src/parse-gram.y" /* yacc.c:1648  */
+#line 302 "src/parse-gram.y" /* yacc.c:1648  */
     { defines_flag = true; }
-#line 2079 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2092 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 10:
-#line 296 "src/parse-gram.y" /* yacc.c:1648  */
+#line 304 "src/parse-gram.y" /* yacc.c:1648  */
     {
       defines_flag = true;
       spec_defines_file = xstrdup ((yyvsp[0].code));
     }
-#line 2088 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2101 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 11:
-#line 301 "src/parse-gram.y" /* yacc.c:1648  */
+#line 309 "src/parse-gram.y" /* yacc.c:1648  */
     {
       muscle_percent_define_insert ("parse.error", (yylsp[0]), muscle_keyword,
                                     "verbose",
                                     MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
     }
-#line 2098 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2111 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 12:
-#line 306 "src/parse-gram.y" /* yacc.c:1648  */
+#line 314 "src/parse-gram.y" /* yacc.c:1648  */
     { expected_sr_conflicts = (yyvsp[0].integer); }
-#line 2104 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2117 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 13:
-#line 307 "src/parse-gram.y" /* yacc.c:1648  */
+#line 315 "src/parse-gram.y" /* yacc.c:1648  */
     { expected_rr_conflicts = (yyvsp[0].integer); }
-#line 2110 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2123 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 14:
-#line 308 "src/parse-gram.y" /* yacc.c:1648  */
+#line 316 "src/parse-gram.y" /* yacc.c:1648  */
     { spec_file_prefix = (yyvsp[0].code); }
-#line 2116 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2129 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 15:
-#line 310 "src/parse-gram.y" /* yacc.c:1648  */
+#line 318 "src/parse-gram.y" /* yacc.c:1648  */
     {
       nondeterministic_parser = true;
       glr_parser = true;
     }
-#line 2125 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2138 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 16:
-#line 315 "src/parse-gram.y" /* yacc.c:1648  */
+#line 323 "src/parse-gram.y" /* yacc.c:1648  */
     {
       muscle_code_grow ("initial_action", translate_code ((yyvsp[0].code), (yylsp[0]), false), (yylsp[0]));
       code_scanner_last_string_free ();
     }
-#line 2134 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2147 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 17:
-#line 319 "src/parse-gram.y" /* yacc.c:1648  */
+#line 327 "src/parse-gram.y" /* yacc.c:1648  */
     { language_argmatch ((yyvsp[0].code), grammar_prio, (yylsp[-1])); }
-#line 2140 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2153 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 18:
-#line 320 "src/parse-gram.y" /* yacc.c:1648  */
+#line 328 "src/parse-gram.y" /* yacc.c:1648  */
     { spec_name_prefix = (yyvsp[0].code); }
-#line 2146 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2159 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 19:
-#line 321 "src/parse-gram.y" /* yacc.c:1648  */
+#line 329 "src/parse-gram.y" /* yacc.c:1648  */
     { no_lines_flag = true; }
-#line 2152 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2165 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 20:
-#line 322 "src/parse-gram.y" /* yacc.c:1648  */
+#line 330 "src/parse-gram.y" /* yacc.c:1648  */
     { nondeterministic_parser = true; }
-#line 2158 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2171 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 21:
-#line 323 "src/parse-gram.y" /* yacc.c:1648  */
+#line 331 "src/parse-gram.y" /* yacc.c:1648  */
     { spec_outfile = (yyvsp[0].code); }
-#line 2164 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2177 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 22:
-#line 324 "src/parse-gram.y" /* yacc.c:1648  */
+#line 332 "src/parse-gram.y" /* yacc.c:1648  */
     { current_param = (yyvsp[0].param); }
-#line 2170 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2183 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 23:
-#line 324 "src/parse-gram.y" /* yacc.c:1648  */
+#line 332 "src/parse-gram.y" /* yacc.c:1648  */
     { current_param = param_none; }
-#line 2176 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2189 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 24:
-#line 325 "src/parse-gram.y" /* yacc.c:1648  */
+#line 333 "src/parse-gram.y" /* yacc.c:1648  */
     { version_check (&(yylsp[0]), (yyvsp[0].code)); }
-#line 2182 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2195 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 25:
-#line 327 "src/parse-gram.y" /* yacc.c:1648  */
+#line 335 "src/parse-gram.y" /* yacc.c:1648  */
     {
       char const *skeleton_user = (yyvsp[0].code);
       if (strchr (skeleton_user, '/'))
@@ -2206,49 +2249,49 @@ yyreduce:
         }
       skeleton_arg (skeleton_user, grammar_prio, (yylsp[-1]));
     }
-#line 2210 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2223 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 26:
-#line 350 "src/parse-gram.y" /* yacc.c:1648  */
+#line 358 "src/parse-gram.y" /* yacc.c:1648  */
     { token_table_flag = true; }
-#line 2216 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2229 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 27:
-#line 351 "src/parse-gram.y" /* yacc.c:1648  */
+#line 359 "src/parse-gram.y" /* yacc.c:1648  */
     { report_flag |= report_states; }
-#line 2222 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2235 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 28:
-#line 352 "src/parse-gram.y" /* yacc.c:1648  */
+#line 360 "src/parse-gram.y" /* yacc.c:1648  */
     { yacc_flag = true; }
-#line 2228 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2241 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 30:
-#line 357 "src/parse-gram.y" /* yacc.c:1648  */
+#line 365 "src/parse-gram.y" /* yacc.c:1648  */
     { add_param (current_param, (yyvsp[0].code), (yylsp[0])); }
-#line 2234 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2247 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 31:
-#line 358 "src/parse-gram.y" /* yacc.c:1648  */
+#line 366 "src/parse-gram.y" /* yacc.c:1648  */
     { add_param (current_param, (yyvsp[0].code), (yylsp[0])); }
-#line 2240 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2253 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 34:
-#line 370 "src/parse-gram.y" /* yacc.c:1648  */
+#line 378 "src/parse-gram.y" /* yacc.c:1648  */
     {
       grammar_start_symbol_set ((yyvsp[0].symbol), (yylsp[0]));
     }
-#line 2248 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2261 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 35:
-#line 374 "src/parse-gram.y" /* yacc.c:1648  */
+#line 382 "src/parse-gram.y" /* yacc.c:1648  */
     {
       code_props code;
       code_props_symbol_action_init (&code, (yyvsp[-1].code), (yylsp[-1]));
@@ -2260,27 +2303,27 @@ yyreduce:
         symbol_list_free ((yyvsp[0].list));
       }
     }
-#line 2264 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2277 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 36:
-#line 386 "src/parse-gram.y" /* yacc.c:1648  */
+#line 394 "src/parse-gram.y" /* yacc.c:1648  */
     {
       default_prec = true;
     }
-#line 2272 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2285 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 37:
-#line 390 "src/parse-gram.y" /* yacc.c:1648  */
+#line 398 "src/parse-gram.y" /* yacc.c:1648  */
     {
       default_prec = false;
     }
-#line 2280 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2293 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 38:
-#line 394 "src/parse-gram.y" /* yacc.c:1648  */
+#line 402 "src/parse-gram.y" /* yacc.c:1648  */
     {
       /* Do not invoke muscle_percent_code_grow here since it invokes
          muscle_user_name_list_grow.  */
@@ -2288,86 +2331,86 @@ yyreduce:
                         translate_code_braceless ((yyvsp[0].code), (yylsp[0])), (yylsp[0]));
       code_scanner_last_string_free ();
     }
-#line 2292 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2305 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 39:
-#line 402 "src/parse-gram.y" /* yacc.c:1648  */
+#line 410 "src/parse-gram.y" /* yacc.c:1648  */
     {
       muscle_percent_code_grow ((yyvsp[-1].uniqstr), (yylsp[-1]), translate_code_braceless ((yyvsp[0].code), (yylsp[0])), (yylsp[0]));
       code_scanner_last_string_free ();
     }
-#line 2301 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2314 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 40:
-#line 412 "src/parse-gram.y" /* yacc.c:1648  */
+#line 420 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.code_type) = destructor; }
-#line 2307 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2320 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 41:
-#line 413 "src/parse-gram.y" /* yacc.c:1648  */
+#line 421 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.code_type) = printer; }
-#line 2313 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2326 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 42:
-#line 423 "src/parse-gram.y" /* yacc.c:1648  */
+#line 431 "src/parse-gram.y" /* yacc.c:1648  */
     {}
-#line 2319 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2332 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 43:
-#line 424 "src/parse-gram.y" /* yacc.c:1648  */
+#line 432 "src/parse-gram.y" /* yacc.c:1648  */
     { muscle_percent_define_insert ("api.value.union.name",
                                          (yylsp[0]), muscle_keyword, (yyvsp[0].uniqstr),
                                          MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE); }
-#line 2327 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2340 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 44:
-#line 431 "src/parse-gram.y" /* yacc.c:1648  */
+#line 439 "src/parse-gram.y" /* yacc.c:1648  */
     {
       union_seen = true;
       muscle_code_grow ("union_members", translate_code_braceless ((yyvsp[0].code), (yylsp[0])), (yylsp[0]));
       code_scanner_last_string_free ();
     }
-#line 2337 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2350 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 45:
-#line 442 "src/parse-gram.y" /* yacc.c:1648  */
+#line 450 "src/parse-gram.y" /* yacc.c:1648  */
     { current_class = nterm_sym; }
-#line 2343 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2356 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 46:
-#line 443 "src/parse-gram.y" /* yacc.c:1648  */
+#line 451 "src/parse-gram.y" /* yacc.c:1648  */
     {
       current_class = unknown_sym;
       current_type = NULL;
     }
-#line 2352 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2365 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 47:
-#line 447 "src/parse-gram.y" /* yacc.c:1648  */
+#line 455 "src/parse-gram.y" /* yacc.c:1648  */
     { current_class = token_sym; }
-#line 2358 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2371 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 48:
-#line 448 "src/parse-gram.y" /* yacc.c:1648  */
+#line 456 "src/parse-gram.y" /* yacc.c:1648  */
     {
       current_class = unknown_sym;
       current_type = NULL;
     }
-#line 2367 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2380 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 49:
-#line 453 "src/parse-gram.y" /* yacc.c:1648  */
+#line 461 "src/parse-gram.y" /* yacc.c:1648  */
     {
       symbol_list *list;
       tag_seen = true;
@@ -2375,11 +2418,11 @@ yyreduce:
         symbol_type_set (list->content.sym, (yyvsp[-1].uniqstr), (yylsp[-1]));
       symbol_list_free ((yyvsp[0].list));
     }
-#line 2379 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2392 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 50:
-#line 464 "src/parse-gram.y" /* yacc.c:1648  */
+#line 472 "src/parse-gram.y" /* yacc.c:1648  */
     {
       symbol_list *list;
       ++current_prec;
@@ -2391,346 +2434,387 @@ yyreduce:
       symbol_list_free ((yyvsp[0].list));
       current_type = NULL;
     }
-#line 2395 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2408 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 51:
-#line 478 "src/parse-gram.y" /* yacc.c:1648  */
+#line 486 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.assoc) = left_assoc; }
-#line 2401 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2414 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 52:
-#line 479 "src/parse-gram.y" /* yacc.c:1648  */
+#line 487 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.assoc) = right_assoc; }
-#line 2407 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2420 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 53:
-#line 480 "src/parse-gram.y" /* yacc.c:1648  */
+#line 488 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.assoc) = non_assoc; }
-#line 2413 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2426 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 54:
-#line 481 "src/parse-gram.y" /* yacc.c:1648  */
+#line 489 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.assoc) = precedence_assoc; }
-#line 2419 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2432 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 55:
-#line 485 "src/parse-gram.y" /* yacc.c:1648  */
+#line 493 "src/parse-gram.y" /* yacc.c:1648  */
     { current_type = NULL; }
-#line 2425 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2438 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 56:
-#line 486 "src/parse-gram.y" /* yacc.c:1648  */
+#line 494 "src/parse-gram.y" /* yacc.c:1648  */
     { current_type = (yyvsp[0].uniqstr); tag_seen = true; }
-#line 2431 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2444 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 57:
-#line 492 "src/parse-gram.y" /* yacc.c:1648  */
+#line 500 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.list) = symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0])); }
-#line 2437 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2450 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 58:
-#line 494 "src/parse-gram.y" /* yacc.c:1648  */
+#line 502 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.list) = symbol_list_append ((yyvsp[-1].list), symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0]))); }
-#line 2443 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2456 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 59:
-#line 499 "src/parse-gram.y" /* yacc.c:1648  */
+#line 507 "src/parse-gram.y" /* yacc.c:1648  */
     {
       (yyval.symbol) = (yyvsp[0].symbol);
       symbol_class_set ((yyvsp[0].symbol), token_sym, (yylsp[0]), false);
     }
-#line 2452 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2465 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 60:
-#line 504 "src/parse-gram.y" /* yacc.c:1648  */
+#line 512 "src/parse-gram.y" /* yacc.c:1648  */
     {
       (yyval.symbol) = (yyvsp[-1].symbol);
       symbol_user_token_number_set ((yyvsp[-1].symbol), (yyvsp[0].integer), (yylsp[0]));
       symbol_class_set ((yyvsp[-1].symbol), token_sym, (yylsp[-1]), false);
     }
-#line 2462 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2475 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 61:
-#line 514 "src/parse-gram.y" /* yacc.c:1648  */
+#line 522 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.list) = symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0])); }
-#line 2468 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2481 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 62:
-#line 516 "src/parse-gram.y" /* yacc.c:1648  */
+#line 524 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.list) = symbol_list_append ((yyvsp[-1].list), symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0]))); }
-#line 2474 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2487 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 63:
-#line 520 "src/parse-gram.y" /* yacc.c:1648  */
+#line 528 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.list) = (yyvsp[0].list); }
-#line 2480 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2493 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 64:
-#line 521 "src/parse-gram.y" /* yacc.c:1648  */
+#line 529 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.list) = symbol_list_append ((yyvsp[-1].list), (yyvsp[0].list)); }
-#line 2486 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2499 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 65:
-#line 525 "src/parse-gram.y" /* yacc.c:1648  */
+#line 533 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.list) = symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0])); }
-#line 2492 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2505 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 66:
-#line 526 "src/parse-gram.y" /* yacc.c:1648  */
+#line 534 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.list) = symbol_list_type_new ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2498 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2511 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 68:
-#line 531 "src/parse-gram.y" /* yacc.c:1648  */
+#line 539 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.uniqstr) = uniqstr_new ("*"); }
-#line 2504 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2517 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 69:
-#line 532 "src/parse-gram.y" /* yacc.c:1648  */
+#line 540 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.uniqstr) = uniqstr_new (""); }
-#line 2510 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2523 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 70:
-#line 538 "src/parse-gram.y" /* yacc.c:1648  */
+#line 546 "src/parse-gram.y" /* yacc.c:1648  */
     {
       current_type = (yyvsp[0].uniqstr);
       tag_seen = true;
     }
-#line 2519 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2532 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 71:
-#line 543 "src/parse-gram.y" /* yacc.c:1648  */
+#line 551 "src/parse-gram.y" /* yacc.c:1648  */
     {
       symbol_class_set ((yyvsp[0].symbol), current_class, (yylsp[0]), true);
       symbol_type_set ((yyvsp[0].symbol), current_type, (yylsp[0]));
     }
-#line 2528 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2541 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 72:
-#line 548 "src/parse-gram.y" /* yacc.c:1648  */
+#line 556 "src/parse-gram.y" /* yacc.c:1648  */
     {
       symbol_class_set ((yyvsp[-1].symbol), current_class, (yylsp[-1]), true);
       symbol_type_set ((yyvsp[-1].symbol), current_type, (yylsp[-1]));
       symbol_user_token_number_set ((yyvsp[-1].symbol), (yyvsp[0].integer), (yylsp[0]));
     }
-#line 2538 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2551 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 73:
-#line 554 "src/parse-gram.y" /* yacc.c:1648  */
+#line 562 "src/parse-gram.y" /* yacc.c:1648  */
     {
       symbol_class_set ((yyvsp[-1].symbol), current_class, (yylsp[-1]), true);
       symbol_type_set ((yyvsp[-1].symbol), current_type, (yylsp[-1]));
       symbol_make_alias ((yyvsp[-1].symbol), (yyvsp[0].symbol), (yyloc));
     }
-#line 2548 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2561 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 74:
-#line 560 "src/parse-gram.y" /* yacc.c:1648  */
+#line 568 "src/parse-gram.y" /* yacc.c:1648  */
     {
       symbol_class_set ((yyvsp[-2].symbol), current_class, (yylsp[-2]), true);
       symbol_type_set ((yyvsp[-2].symbol), current_type, (yylsp[-2]));
       symbol_user_token_number_set ((yyvsp[-2].symbol), (yyvsp[-1].integer), (yylsp[-1]));
       symbol_make_alias ((yyvsp[-2].symbol), (yyvsp[0].symbol), (yyloc));
     }
-#line 2559 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2572 "src/parse-gram.c" /* yacc.c:1648  */
+    break;
+
+  case 80:
+#line 597 "src/parse-gram.y" /* yacc.c:1648  */
+    {
+ /* this should be done inside the rule with a more descriptive tag */
+ insert_after(0, "</GrammarDeclaration>");
+ insert_before(0, "<GrammarDeclaration>");
+ }
+#line 2582 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 81:
-#line 590 "src/parse-gram.y" /* yacc.c:1648  */
+#line 603 "src/parse-gram.y" /* yacc.c:1648  */
     {
       yyerrok;
     }
-#line 2567 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2590 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 82:
-#line 596 "src/parse-gram.y" /* yacc.c:1648  */
+#line 609 "src/parse-gram.y" /* yacc.c:1648  */
     { current_lhs ((yyvsp[-1].symbol), (yylsp[-1]), (yyvsp[0].named_ref)); }
-#line 2573 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2596 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 83:
-#line 597 "src/parse-gram.y" /* yacc.c:1648  */
+#line 610 "src/parse-gram.y" /* yacc.c:1648  */
     {
     /* Free the current lhs. */
     current_lhs (0, (yylsp[-3]), 0);
+ insert_after(3, "</Rule>");
+ insert_after(3, "</Productions>");
+ insert_before(3, "<Productions>");
+ insert_before(0, "<Rule>");
   }
-#line 2582 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2609 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 84:
-#line 604 "src/parse-gram.y" /* yacc.c:1648  */
-    { grammar_current_rule_end ((yylsp[0])); }
-#line 2588 "src/parse-gram.c" /* yacc.c:1648  */
+#line 621 "src/parse-gram.y" /* yacc.c:1648  */
+    { grammar_current_rule_end ((yylsp[0])); /*}*/
+ /* this should be done inside the rule with a more descriptive tag */
+ insert_after(0, "</Production>");
+ insert_before(0, "<Production>");
+ }
+#line 2619 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 85:
-#line 605 "src/parse-gram.y" /* yacc.c:1648  */
-    { grammar_current_rule_end ((yylsp[0])); }
-#line 2594 "src/parse-gram.c" /* yacc.c:1648  */
+#line 626 "src/parse-gram.y" /* yacc.c:1648  */
+    { grammar_current_rule_end ((yylsp[0])); /*}*/
+ /* this should be done inside the rule with a more descriptive tag */
+ insert_after(2, "</Production>");
+ insert_before(2, "<Production>");
+ }
+#line 2629 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 87:
-#line 612 "src/parse-gram.y" /* yacc.c:1648  */
+#line 637 "src/parse-gram.y" /* yacc.c:1648  */
     { grammar_current_rule_begin (current_lhs_symbol, current_lhs_location,
                                   current_lhs_named_ref); }
-#line 2601 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2636 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 88:
-#line 615 "src/parse-gram.y" /* yacc.c:1648  */
+#line 640 "src/parse-gram.y" /* yacc.c:1648  */
     { grammar_current_rule_symbol_append ((yyvsp[-1].symbol), (yylsp[-1]), (yyvsp[0].named_ref)); }
-#line 2607 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2642 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 89:
-#line 617 "src/parse-gram.y" /* yacc.c:1648  */
+#line 642 "src/parse-gram.y" /* yacc.c:1648  */
     { grammar_current_rule_action_append ((yyvsp[-1].code), (yylsp[-1]), (yyvsp[0].named_ref), false); }
-#line 2613 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2648 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 90:
-#line 619 "src/parse-gram.y" /* yacc.c:1648  */
+#line 644 "src/parse-gram.y" /* yacc.c:1648  */
     { grammar_current_rule_action_append ((yyvsp[0].code), (yylsp[0]), NULL, true); }
-#line 2619 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2654 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 91:
-#line 621 "src/parse-gram.y" /* yacc.c:1648  */
+#line 646 "src/parse-gram.y" /* yacc.c:1648  */
     { grammar_current_rule_empty_set ((yylsp[0])); }
-#line 2625 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2660 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 92:
-#line 623 "src/parse-gram.y" /* yacc.c:1648  */
+#line 648 "src/parse-gram.y" /* yacc.c:1648  */
     { grammar_current_rule_prec_set ((yyvsp[0].symbol), (yylsp[0])); }
-#line 2631 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2666 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 93:
-#line 625 "src/parse-gram.y" /* yacc.c:1648  */
+#line 650 "src/parse-gram.y" /* yacc.c:1648  */
     { grammar_current_rule_dprec_set ((yyvsp[0].integer), (yylsp[0])); }
-#line 2637 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2672 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 94:
-#line 627 "src/parse-gram.y" /* yacc.c:1648  */
+#line 652 "src/parse-gram.y" /* yacc.c:1648  */
     { grammar_current_rule_merge_set ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2643 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2678 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 95:
-#line 631 "src/parse-gram.y" /* yacc.c:1648  */
+#line 656 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.named_ref) = 0; }
-#line 2649 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2684 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 96:
-#line 632 "src/parse-gram.y" /* yacc.c:1648  */
+#line 657 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.named_ref) = named_ref_new ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2655 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2690 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 98:
-#line 643 "src/parse-gram.y" /* yacc.c:1648  */
+#line 668 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.uniqstr) = uniqstr_new ((yyvsp[0].code)); }
-#line 2661 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2696 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 99:
-#line 668 "src/parse-gram.y" /* yacc.c:1648  */
+#line 693 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.value).kind = muscle_keyword; (yyval.value).chars = ""; }
-#line 2667 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2702 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 100:
-#line 669 "src/parse-gram.y" /* yacc.c:1648  */
+#line 694 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.value).kind = muscle_keyword; (yyval.value).chars = (yyvsp[0].uniqstr); }
-#line 2673 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2708 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 101:
-#line 670 "src/parse-gram.y" /* yacc.c:1648  */
+#line 695 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.value).kind = muscle_string;  (yyval.value).chars = (yyvsp[0].code); }
-#line 2679 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2714 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 102:
-#line 671 "src/parse-gram.y" /* yacc.c:1648  */
+#line 696 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.value).kind = muscle_code;    (yyval.value).chars = strip_braces ((yyvsp[0].code)); }
-#line 2685 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2720 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 103:
-#line 684 "src/parse-gram.y" /* yacc.c:1648  */
+#line 709 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.symbol) = symbol_from_uniqstr ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2691 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2726 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 104:
-#line 686 "src/parse-gram.y" /* yacc.c:1648  */
+#line 711 "src/parse-gram.y" /* yacc.c:1648  */
     {
       (yyval.symbol) = symbol_get (char_name ((yyvsp[0].character)), (yylsp[0]));
       symbol_class_set ((yyval.symbol), token_sym, (yylsp[0]), false);
       symbol_user_token_number_set ((yyval.symbol), (yyvsp[0].character), (yylsp[0]));
     }
-#line 2701 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2736 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 105:
-#line 694 "src/parse-gram.y" /* yacc.c:1648  */
+#line 719 "src/parse-gram.y" /* yacc.c:1648  */
     { (yyval.symbol) = symbol_from_uniqstr ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2707 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2742 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 108:
-#line 706 "src/parse-gram.y" /* yacc.c:1648  */
+#line 731 "src/parse-gram.y" /* yacc.c:1648  */
     {
       (yyval.symbol) = symbol_get (quotearg_style (c_quoting_style, (yyvsp[0].code)), (yylsp[0]));
       symbol_class_set ((yyval.symbol), token_sym, (yylsp[0]), false);
     }
-#line 2716 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2751 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
   case 110:
-#line 715 "src/parse-gram.y" /* yacc.c:1648  */
+#line 740 "src/parse-gram.y" /* yacc.c:1648  */
     {
       muscle_code_grow ("epilogue", translate_code ((yyvsp[0].code), (yylsp[0]), true), (yylsp[0]));
       code_scanner_last_string_free ();
+ insert_after(1, "</Sect3>");
+ insert_before(1, "<Sect3>");
     }
-#line 2725 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2762 "src/parse-gram.c" /* yacc.c:1648  */
     break;
 
 
-#line 2729 "src/parse-gram.c" /* yacc.c:1648  */
+#line 2766 "src/parse-gram.c" /* yacc.c:1648  */
         default: break;
       }
     if (yychar_backup != yychar)
       YY_LAC_DISCARD ("yychar change");
   }
+ int i;
+ size_t j = 0;
+ for (i = piece2; i < piece3; ++i)
+  j += strlen(piece[i]);
+ char *q = malloc(j + 1);
+ j = 0;
+ for (i = piece2; i < piece3; ++i) {
+  size_t k = strlen(piece[i]);
+  memcpy(q + j, piece[i], k);
+  free(piece[i]);
+  j += k;
+ }
+ q[j] = 0;
+ memmove(piece + piece2 + 1, piece + piece3, (piece1 - piece3) * sizeof(char *));
+ piece[piece2] = q;
+ piece0 += piece2 + 1 - piece3;
+ piece1 += piece2 + 1 - piece3;
   /* User semantic actions sometimes alter yychar, and that requires
      that yytoken be updated with the new translation.  We take the
      approach of translating immediately before every use of yytoken.
@@ -2971,7 +3055,7 @@ yyreturn:
 #endif
   return yyresult;
 }
-#line 721 "src/parse-gram.y" /* yacc.c:1907  */
+#line 748 "src/parse-gram.y" /* yacc.c:1907  */
 
 
 /* Return the location of the left-hand side of a rule whose
diff --git a/src/parse-gram.c.patch b/src/parse-gram.c.patch
new file mode 100644 (file)
index 0000000..5e7e893
--- /dev/null
@@ -0,0 +1,70 @@
+--- parse-gram.c.orig  2018-06-14 17:52:45.371946333 +1000
++++ parse-gram.c       2018-06-15 08:48:43.493541783 +1000
+@@ -1742,6 +1742,25 @@
+ | yyparse.  |
+ `----------*/
++extern char piece_temp[];
++extern char *piece[];
++extern int piece0, piece1;
++void insert_piece(int n, const void *str);
++int piece2, piece3;
++static void peek(int *yychar_p, YYSTYPE *yylval_p, YYLTYPE *yylloc_p) {
++ if (*yychar_p == YYEMPTY)
++  *yychar_p = yylex(yylval_p, yylloc_p);
++ memmove(piece + piece3 + 3, piece + piece3 + 1, (piece1 - piece3 - 1) * sizeof(char *));
++ piece[piece3 + 1] = strdup("");
++ piece[piece3 + 2] = strdup("");
++ piece3 += 2;
++ piece0 += 2;
++ piece1 += 2;
++}
++#define insert_before(n, str) \
++ do { insert_piece(piece2 + (n) * 2, (str)); ++piece3; } while (0)
++#define insert_after(n, str) \
++ do { insert_piece(piece2 + (n) * 2 + 1, (str)); ++piece3; } while (0)
+ int
+ yyparse (void)
+ {
+@@ -2026,6 +2045,17 @@
+ yyreduce:
+   /* yyn is the number of a rule to reduce with.  */
+   yylen = yyr2[yyn];
++ int n = ((int)(yyvsp - yyvsa) - yylen) * 2;
++ piece2 = n + 1;
++ piece3 = n + yylen * 2;
++ if (yylen == 0) {
++  memmove(piece + n + 2, piece + n, (piece1 - n) * sizeof(char *));
++  piece[n] = strdup("");
++  piece[n + 1] = strdup("");
++  piece3 = n + 2;
++  piece0 += 2;
++  piece1 += 2;
++ }
+   /* If YYLEN is nonzero, implement the default value of the action:
+      '$$ = $1'.
+@@ -2768,6 +2798,23 @@
+     if (yychar_backup != yychar)
+       YY_LAC_DISCARD ("yychar change");
+   }
++ int i;
++ size_t j = 0;
++ for (i = piece2; i < piece3; ++i)
++  j += strlen(piece[i]);
++ char *q = malloc(j + 1);
++ j = 0;
++ for (i = piece2; i < piece3; ++i) {
++  size_t k = strlen(piece[i]);
++  memcpy(q + j, piece[i], k);
++  free(piece[i]);
++  j += k;
++ }
++ q[j] = 0;
++ memmove(piece + piece2 + 1, piece + piece3, (piece1 - piece3) * sizeof(char *));
++ piece[piece2] = q;
++ piece0 += piece2 + 1 - piece3;
++ piece1 += piece2 + 1 - piece3;
+   /* User semantic actions sometimes alter yychar, and that requires
+      that yytoken be updated with the new translation.  We take the
+      approach of translating immediately before every use of yytoken.
index 450a768..3df8ceb 100644 (file)
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 3.0.4.38-1047-dirty.  */
+/* A Bison parser, made by GNU Bison 3.0.5.  */
 
 /* Bison interface for Yacc-like parsers in C
 
@@ -61,7 +61,7 @@ extern int gram_debug;
     param_parse  = 1 << 1,
     param_both   = param_lex | param_parse
   } param_type;
-#line 647 "src/parse-gram.y" /* yacc.c:1910  */
+#line 672 "src/parse-gram.y" /* yacc.c:1910  */
 #include "muscle-tab.h"
 
 #line 68 "src/parse-gram.h" /* yacc.c:1910  */
@@ -153,9 +153,9 @@ symbol_list *list;
 named_ref *named_ref;
 #line 241 "src/parse-gram.y" /* yacc.c:1910  */
 param_type param;
-#line 409 "src/parse-gram.y" /* yacc.c:1910  */
+#line 417 "src/parse-gram.y" /* yacc.c:1910  */
 code_props_type code_type;
-#line 649 "src/parse-gram.y" /* yacc.c:1910  */
+#line 674 "src/parse-gram.y" /* yacc.c:1910  */
 
   struct
   {
index 30b97e3..f0e1f48 100644 (file)
 
 input:
   prologue_declarations "%%" grammar epilogue.opt
+ {
+ insert_after(3, "</root>");
+ insert_after(2, "</Sect2>");
+ insert_before(2, "<Sect2>");
+ insert_after(0, "</Sect1>");
+ insert_before(0, "<Sect1>");
+ insert_before(0, "<root>");
+ }
 ;
 
 
@@ -586,6 +594,11 @@ grammar:
 rules_or_grammar_declaration:
   rules
 | grammar_declaration ";"
+ {
+ /* this should be done inside the rule with a more descriptive tag */
+ insert_after(0, "</GrammarDeclaration>");
+ insert_before(0, "<GrammarDeclaration>");
+ }
 | error ";"
     {
       yyerrok;
@@ -597,12 +610,24 @@ rules:
   {
     /* Free the current lhs. */
     current_lhs (0, @1, 0);
+ insert_after(3, "</Rule>");
+ insert_after(3, "</Productions>");
+ insert_before(3, "<Productions>");
+ insert_before(0, "<Rule>");
   }
 ;
 
 rhses.1:
-  rhs                { grammar_current_rule_end (@1); }
-| rhses.1 "|" rhs    { grammar_current_rule_end (@3); }
+  rhs                { grammar_current_rule_end (@1); /*}*/
+ /* this should be done inside the rule with a more descriptive tag */
+ insert_after(0, "</Production>");
+ insert_before(0, "<Production>");
+ }
+| rhses.1 "|" rhs    { grammar_current_rule_end (@3); /*}*/
+ /* this should be done inside the rule with a more descriptive tag */
+ insert_after(2, "</Production>");
+ insert_before(2, "<Production>");
+ }
 | rhses.1 ";"
 ;
 
@@ -715,6 +740,8 @@ epilogue.opt:
     {
       muscle_code_grow ("epilogue", translate_code ($2, @2, true), @2);
       code_scanner_last_string_free ();
+ insert_after(1, "</Sect3>");
+ insert_before(1, "<Sect3>");
     }
 ;
 
index d426193..93103ee 100644 (file)
@@ -667,6 +667,13 @@ reader (void)
   gram_debug = trace_flag & trace_parse;
   gram_scanner_initialize ();
   gram_parse ();
+#if 1
+ extern char *piece[];
+ extern int piece1;
+ int i;
+ for (i = 0; i < piece1; ++i)
+  fputs(piece[i], stderr);
+#endif
   prepare_percent_define_front_end_variables ();
 
   if (complaint_status  < status_complaint)
index 477344f..68b9f70 100644 (file)
@@ -1,27 +1,22 @@
-#line 1 "src/scan-code.c"
+#line 2 "src/scan-code.c"
 
-#line 3 "src/scan-code.c"
+#line 4 "src/scan-code.c"
 
 #define  YY_INT_ALIGNED short int
 
 /* A lexical scanner generated by flex */
 
 /* %not-for-header */
+
 /* %if-c-only */
 /* %if-not-reentrant */
 #define yy_create_buffer code__create_buffer
 #define yy_delete_buffer code__delete_buffer
-#define yy_scan_buffer code__scan_buffer
-#define yy_scan_string code__scan_string
-#define yy_scan_bytes code__scan_bytes
+#define yy_flex_debug code__flex_debug
 #define yy_init_buffer code__init_buffer
 #define yy_flush_buffer code__flush_buffer
 #define yy_load_buffer_state code__load_buffer_state
 #define yy_switch_to_buffer code__switch_to_buffer
-#define yypush_buffer_state code_push_buffer_state
-#define yypop_buffer_state code_pop_buffer_state
-#define yyensure_buffer_stack code_ensure_buffer_stack
-#define yy_flex_debug code__flex_debug
 #define yyin code_in
 #define yyleng code_leng
 #define yylex code_lex
@@ -40,8 +35,8 @@
 
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
 /* %endif */
 
 /* %if-c-only */
-#ifdef yy_create_buffer
-#define code__create_buffer_ALREADY_DEFINED
-#else
-#define yy_create_buffer code__create_buffer
-#endif
-
-#ifdef yy_delete_buffer
-#define code__delete_buffer_ALREADY_DEFINED
-#else
-#define yy_delete_buffer code__delete_buffer
-#endif
-
-#ifdef yy_scan_buffer
-#define code__scan_buffer_ALREADY_DEFINED
-#else
-#define yy_scan_buffer code__scan_buffer
-#endif
-
-#ifdef yy_scan_string
-#define code__scan_string_ALREADY_DEFINED
-#else
-#define yy_scan_string code__scan_string
-#endif
-
-#ifdef yy_scan_bytes
-#define code__scan_bytes_ALREADY_DEFINED
-#else
-#define yy_scan_bytes code__scan_bytes
-#endif
-
-#ifdef yy_init_buffer
-#define code__init_buffer_ALREADY_DEFINED
-#else
-#define yy_init_buffer code__init_buffer
-#endif
-
-#ifdef yy_flush_buffer
-#define code__flush_buffer_ALREADY_DEFINED
-#else
-#define yy_flush_buffer code__flush_buffer
-#endif
-
-#ifdef yy_load_buffer_state
-#define code__load_buffer_state_ALREADY_DEFINED
-#else
-#define yy_load_buffer_state code__load_buffer_state
-#endif
-
-#ifdef yy_switch_to_buffer
-#define code__switch_to_buffer_ALREADY_DEFINED
-#else
-#define yy_switch_to_buffer code__switch_to_buffer
-#endif
-
-#ifdef yypush_buffer_state
-#define code_push_buffer_state_ALREADY_DEFINED
-#else
-#define yypush_buffer_state code_push_buffer_state
-#endif
-
-#ifdef yypop_buffer_state
-#define code_pop_buffer_state_ALREADY_DEFINED
-#else
-#define yypop_buffer_state code_pop_buffer_state
-#endif
-
-#ifdef yyensure_buffer_stack
-#define code_ensure_buffer_stack_ALREADY_DEFINED
-#else
-#define yyensure_buffer_stack code_ensure_buffer_stack
-#endif
-
-#ifdef yylex
-#define code_lex_ALREADY_DEFINED
-#else
-#define yylex code_lex
-#endif
-
-#ifdef yyrestart
-#define code_restart_ALREADY_DEFINED
-#else
-#define yyrestart code_restart
-#endif
-
-#ifdef yylex_init
-#define code_lex_init_ALREADY_DEFINED
-#else
-#define yylex_init code_lex_init
-#endif
-
-#ifdef yylex_init_extra
-#define code_lex_init_extra_ALREADY_DEFINED
-#else
-#define yylex_init_extra code_lex_init_extra
-#endif
-
-#ifdef yylex_destroy
-#define code_lex_destroy_ALREADY_DEFINED
-#else
-#define yylex_destroy code_lex_destroy
-#endif
-
-#ifdef yyget_debug
-#define code_get_debug_ALREADY_DEFINED
-#else
-#define yyget_debug code_get_debug
-#endif
-
-#ifdef yyset_debug
-#define code_set_debug_ALREADY_DEFINED
-#else
-#define yyset_debug code_set_debug
-#endif
-
-#ifdef yyget_extra
-#define code_get_extra_ALREADY_DEFINED
-#else
-#define yyget_extra code_get_extra
-#endif
-
-#ifdef yyset_extra
-#define code_set_extra_ALREADY_DEFINED
-#else
-#define yyset_extra code_set_extra
-#endif
-
-#ifdef yyget_in
-#define code_get_in_ALREADY_DEFINED
-#else
-#define yyget_in code_get_in
-#endif
-
-#ifdef yyset_in
-#define code_set_in_ALREADY_DEFINED
-#else
-#define yyset_in code_set_in
-#endif
-
-#ifdef yyget_out
-#define code_get_out_ALREADY_DEFINED
-#else
-#define yyget_out code_get_out
-#endif
-
-#ifdef yyset_out
-#define code_set_out_ALREADY_DEFINED
-#else
-#define yyset_out code_set_out
-#endif
-
-#ifdef yyget_leng
-#define code_get_leng_ALREADY_DEFINED
-#else
-#define yyget_leng code_get_leng
-#endif
-
-#ifdef yyget_text
-#define code_get_text_ALREADY_DEFINED
-#else
-#define yyget_text code_get_text
-#endif
-
-#ifdef yyget_lineno
-#define code_get_lineno_ALREADY_DEFINED
-#else
-#define yyget_lineno code_get_lineno
-#endif
-
-#ifdef yyset_lineno
-#define code_set_lineno_ALREADY_DEFINED
-#else
-#define yyset_lineno code_set_lineno
-#endif
-
-#ifdef yywrap
-#define code_wrap_ALREADY_DEFINED
-#else
-#define yywrap code_wrap
-#endif
-
+    
 /* %endif */
 
-#ifdef yyalloc
-#define code_alloc_ALREADY_DEFINED
-#else
-#define yyalloc code_alloc
-#endif
-
-#ifdef yyrealloc
-#define code_realloc_ALREADY_DEFINED
-#else
-#define yyrealloc code_realloc
-#endif
-
-#ifdef yyfree
-#define code_free_ALREADY_DEFINED
-#else
-#define yyfree code_free
-#endif
-
 /* %if-c-only */
 
-#ifdef yytext
-#define code_text_ALREADY_DEFINED
-#else
-#define yytext code_text
-#endif
-
-#ifdef yyleng
-#define code_leng_ALREADY_DEFINED
-#else
-#define yyleng code_leng
-#endif
-
-#ifdef yyin
-#define code_in_ALREADY_DEFINED
-#else
-#define yyin code_in
-#endif
-
-#ifdef yyout
-#define code_out_ALREADY_DEFINED
-#else
-#define yyout code_out
-#endif
-
-#ifdef yy_flex_debug
-#define code__flex_debug_ALREADY_DEFINED
-#else
-#define yy_flex_debug code__flex_debug
-#endif
-
-#ifdef yylineno
-#define code_lineno_ALREADY_DEFINED
-#else
-#define yylineno code_lineno
-#endif
-
 /* %endif */
 
 /* First, we deal with  platform-specific or compiler-specific issues. */
@@ -365,39 +127,50 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
-#ifndef SIZE_MAX
-#define SIZE_MAX               (~(size_t)0)
-#endif
-
 #endif /* ! C99 */
 
 #endif /* ! FLEXINT_H */
 
 /* %endif */
 
-/* begin standard C++ headers. */
 /* %if-c++-only */
 /* %endif */
 
-/* TODO: this is always defined, so inline it */
-#define yyconst const
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else  /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
 
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define yynoreturn __attribute__((__noreturn__))
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
 #else
-#define yynoreturn
+#define yyconst
 #endif
 
 /* %not-for-header */
+
 /* Returned upon end-of-file. */
 #define YY_NULL 0
 /* %ok-for-header */
 
 /* %not-for-header */
-/* Promotes a possibly negative, possibly signed char to an
- *   integer in range [0..255] for use as an array index.
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
  */
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
 /* %ok-for-header */
 
 /* %if-reentrant */
@@ -412,16 +185,20 @@ typedef unsigned int flex_uint32_t;
  * definition of BEGIN.
  */
 #define BEGIN (yy_start) = 1 + 2 *
+
 /* Translate the current start state into a value that can be later handed
  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  * compatibility.
  */
 #define YY_START (((yy_start) - 1) / 2)
 #define YYSTATE YY_START
+
 /* Action number for EOF rule of a given start state. */
 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
 /* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin  )
+#define YY_NEW_FILE code_restart(code_in  )
+
 #define YY_END_OF_BUFFER_CHAR 0
 
 /* Size of default input buffer. */
@@ -446,43 +223,43 @@ typedef unsigned int flex_uint32_t;
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
 /* %if-not-reentrant */
-extern int yyleng;
+extern int code_leng;
 /* %endif */
 
 /* %if-c-only */
 /* %if-not-reentrant */
-extern FILE *yyin, *yyout;
+extern FILE *code_in, *code_out;
 /* %endif */
 /* %endif */
 
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
-    
+
     #define YY_LESS_LINENO(n)
-    #define YY_LINENO_REWIND_TO(ptr)
     
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
        do \
                { \
-               /* Undo effects of setting up yytext. */ \
+               /* Undo effects of setting up code_text. */ \
         int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
                *yy_cp = (yy_hold_char); \
                YY_RESTORE_YY_MORE_OFFSET \
                (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-               YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+               YY_DO_BEFORE_ACTION; /* set up code_text again */ \
                } \
        while ( 0 )
+
 #define unput(c) yyunput( c, (yytext_ptr)  )
 
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
 #ifndef YY_STRUCT_YY_BUFFER_STATE
 #define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
@@ -500,7 +277,7 @@ struct yy_buffer_state
        /* Size of input buffer in bytes, not including room for EOB
         * characters.
         */
-       int yy_buf_size;
+       yy_size_t yy_buf_size;
 
        /* Number of characters read into yy_ch_buf, not including EOB
         * characters.
@@ -528,7 +305,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-
+    
        /* Whether to try to fill the input buffer when we reach the
         * end of it.
         */
@@ -545,8 +322,8 @@ struct yy_buffer_state
         * possible backing-up.
         *
         * When we actually see the EOF, we change the status to "new"
-        * (via yyrestart()), so that the user can continue scanning by
-        * just pointing yyin at a new input file.
+        * (via code_restart()), so that the user can continue scanning by
+        * just pointing code_in at a new input file.
         */
 #define YY_BUFFER_EOF_PENDING 2
 
@@ -555,12 +332,13 @@ struct yy_buffer_state
 
 /* %if-c-only Standard (non-C++) definition */
 /* %not-for-header */
+
 /* %if-not-reentrant */
 
 /* Stack of input buffers. */
 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
 /* %endif */
 /* %ok-for-header */
 
@@ -575,6 +353,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                           : NULL)
+
 /* Same as previous macro, but useful when we know that the buffer stack is not
  * NULL or when we need an lvalue. For internal use only.
  */
@@ -584,112 +363,115 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
 
 /* %if-not-reentrant */
 /* %not-for-header */
-/* yy_hold_char holds the character lost when yytext is formed. */
+
+/* yy_hold_char holds the character lost when code_text is formed. */
 static char yy_hold_char;
 static int yy_n_chars;         /* number of characters read into yy_ch_buf */
-int yyleng;
+int code_leng;
 
 /* Points to current character in buffer. */
-static char *yy_c_buf_p = NULL;
+static char *yy_c_buf_p = (char *) 0;
 static int yy_init = 0;                /* whether we need to initialize */
 static int yy_start = 0;       /* start state number */
 
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
+/* Flag which is used to allow code_wrap()'s to do buffer switches
+ * instead of setting up a fresh code_in.  A bit of a hack ...
  */
 static int yy_did_buffer_switch_on_eof;
 /* %ok-for-header */
 
 /* %endif */
 
-void yyrestart ( FILE *input_file  );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
-void yy_delete_buffer ( YY_BUFFER_STATE b  );
-void yy_flush_buffer ( YY_BUFFER_STATE b  );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
-void yypop_buffer_state ( void );
+void code_restart (FILE *input_file  );
+void code__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE code__create_buffer (FILE *file,int size  );
+void code__delete_buffer (YY_BUFFER_STATE b  );
+void code__flush_buffer (YY_BUFFER_STATE b  );
+void code_push_buffer_state (YY_BUFFER_STATE new_buffer  );
+void code_pop_buffer_state (void );
+
+static void code_ensure_buffer_stack (void );
+static void code__load_buffer_state (void );
+static void code__init_buffer (YY_BUFFER_STATE b,FILE *file  );
 
-static void yyensure_buffer_stack ( void );
-static void yy_load_buffer_state ( void );
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER code__flush_buffer(YY_CURRENT_BUFFER )
 
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );
+YY_BUFFER_STATE code__scan_buffer (char *base,yy_size_t size  );
+YY_BUFFER_STATE code__scan_string (yyconst char *yy_str  );
+YY_BUFFER_STATE code__scan_bytes (yyconst char *bytes,int len  );
 
 /* %endif */
 
-void *yyalloc ( yy_size_t  );
-void *yyrealloc ( void *, yy_size_t  );
-void yyfree ( void *  );
+void *code_alloc (yy_size_t  );
+void *code_realloc (void *,yy_size_t  );
+void code_free (void *  );
+
+#define yy_new_buffer code__create_buffer
 
-#define yy_new_buffer yy_create_buffer
 #define yy_set_interactive(is_interactive) \
        { \
        if ( ! YY_CURRENT_BUFFER ){ \
-        yyensure_buffer_stack (); \
+        code_ensure_buffer_stack (); \
                YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer( yyin, YY_BUF_SIZE ); \
+            code__create_buffer(code_in,YY_BUF_SIZE ); \
        } \
        YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
        }
+
 #define yy_set_bol(at_bol) \
        { \
        if ( ! YY_CURRENT_BUFFER ){\
-        yyensure_buffer_stack (); \
+        code_ensure_buffer_stack (); \
                YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer( yyin, YY_BUF_SIZE ); \
+            code__create_buffer(code_in,YY_BUF_SIZE ); \
        } \
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
        }
+
 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
-/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
+/* %% [1.0] code_text/code_in/code_out/yy_state_type/code_lineno etc. def's & init go here */
 /* Begin user sect3 */
 
-#define code_wrap() (/*CONSTCOND*/1)
+#define code_wrap(n) 1
 #define YY_SKIP_YYWRAP
 
 #define FLEX_DEBUG
-typedef flex_uint8_t YY_CHAR;
 
-FILE *yyin = NULL, *yyout = NULL;
+typedef unsigned char YY_CHAR;
+
+FILE *code_in = (FILE *) 0, *code_out = (FILE *) 0;
 
 typedef int yy_state_type;
 
-extern int yylineno;
-int yylineno = 1;
+extern int code_lineno;
 
-extern char *yytext;
-#ifdef yytext_ptr
-#undef yytext_ptr
-#endif
-#define yytext_ptr yytext
+int code_lineno = 1;
 
-/* %% [1.5] DFA */
+extern char *code_text;
+#define yytext_ptr code_text
 
 /* %if-c-only Standard (non-C++) definition */
 
-static yy_state_type yy_get_previous_state ( void );
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
-static int yy_get_next_buffer ( void );
-static void yynoreturn yy_fatal_error ( const char* msg  );
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[]  );
 
 /* %endif */
 
 /* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
+ * corresponding action - sets up code_text.
  */
 #define YY_DO_BEFORE_ACTION \
        (yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
-       yyleng = (int) (yy_cp - yy_bp); \
+/* %% [2.0] code to fiddle code_text and code_leng for yymore() goes here \ */\
+       code_leng = (size_t) (yy_cp - yy_bp); \
        (yy_hold_char) = *yy_cp; \
        *yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
+/* %% [3.0] code to copy yytext_ptr to code_text[] goes here, if %array \ */\
        (yy_c_buf_p) = yy_cp;
+
 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
 #define YY_NUM_RULES 18
 #define YY_END_OF_BUFFER 19
@@ -700,7 +482,7 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static const flex_int16_t yy_accept[91] =
+static yyconst flex_int16_t yy_accept[91] =
     {   0,
         0,    0,    0,    0,    3,    3,    4,    4,    4,    4,
         0,    0,    0,    0,   19,   17,   16,   17,    2,   17,
@@ -713,7 +495,7 @@ static const flex_int16_t yy_accept[91] =
        12,   12,    0,   14,   12,   12,    0,    0,    0,    0
     } ;
 
-static const YY_CHAR yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         2,    2,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -745,13 +527,13 @@ static const YY_CHAR yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static const YY_CHAR yy_meta[19] =
+static yyconst flex_int32_t yy_meta[19] =
     {   0,
         1,    1,    2,    1,    1,    1,    1,    3,    3,    1,
         3,    1,    2,    1,    1,    1,    1,    2
     } ;
 
-static const flex_int16_t yy_base[97] =
+static yyconst flex_int16_t yy_base[97] =
     {   0,
         0,   13,  121,  120,    0,    3,    4,    5,    6,    7,
        27,    0,   20,   21,  125,  178,  178,   26,  178,    8,
@@ -766,7 +548,7 @@ static const flex_int16_t yy_base[97] =
 
     } ;
 
-static const flex_int16_t yy_def[97] =
+static yyconst flex_int16_t yy_def[97] =
     {   0,
        91,   91,    2,    2,    2,    2,    2,    2,    2,    2,
         2,   11,   11,   11,   90,   90,   90,   90,   90,   90,
@@ -781,7 +563,7 @@ static const flex_int16_t yy_def[97] =
 
     } ;
 
-static const flex_int16_t yy_nxt[197] =
+static yyconst flex_int16_t yy_nxt[197] =
     {   0,
        90,   90,   19,   69,   17,   19,   63,   21,   21,   33,
        34,   23,   23,   17,   17,   20,   17,   17,   20,   22,
@@ -807,7 +589,7 @@ static const flex_int16_t yy_nxt[197] =
 
     } ;
 
-static const flex_int16_t yy_chk[197] =
+static yyconst flex_int16_t yy_chk[197] =
     {   0,
         0,    0,    5,   95,    1,    6,   93,    7,    8,   20,
        20,    9,   10,    1,    1,    5,    1,    2,    6,    7,
@@ -836,13 +618,13 @@ static const flex_int16_t yy_chk[197] =
 static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
 
-extern int yy_flex_debug;
-int yy_flex_debug = 1;
+extern int code__flex_debug;
+int code__flex_debug = 1;
 
-static const flex_int16_t yy_rule_linenum[18] =
+static yyconst flex_int16_t yy_rule_linenum[18] =
     {   0,
-      115,  125,  126,  136,  141,  146,  152,  153,  154,  155,
-      157,  165,  171,  181,  189,  199,  202
+      114,  124,  125,  135,  140,  145,  151,  152,  153,  154,
+      156,  164,  170,  180,  188,  198,  201
     } ;
 
 /* The intent behind this definition is that it'll catch
@@ -852,8 +634,8 @@ static const flex_int16_t yy_rule_linenum[18] =
 #define yymore() yymore_used_but_not_detected
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "/Users/akim/src/gnu/bison/src/scan-code.l"
+char *code_text;
+#line 1 "src/scan-code.l"
 /* Bison Action Scanner                             -*- C -*-
 
    Copyright (C) 2006-2015, 2018 Free Software Foundation, Inc.
@@ -873,7 +655,7 @@ char *yytext;
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define YY_NO_INPUT 1
-#line 24 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 24 "src/scan-code.l"
 /* Work around a bug in flex 2.5.31.  See Debian bug 333231
    <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>.  */
 #undef code_wrap
@@ -898,7 +680,7 @@ char *yytext;
 # define YY_DECL static char *code_lex (code_props *self, int sc_context)
 YY_DECL;
 
-#define YY_USER_ACTION  location_compute (loc, &loc->end, yytext, yyleng);
+#define YY_USER_ACTION  location_compute (loc, &loc->end, code_text, code_leng);
 
 static char *fetch_type_name (char *cp, char const **type_name,
                               location dollar_loc);
@@ -919,14 +701,12 @@ static char *last_string;
 /* True if an untyped $$ or $n was seen.  */
 static bool untyped_var_seen;
 
-#line 922 "src/scan-code.c"
-#line 71 "/Users/akim/src/gnu/bison/src/scan-code.l"
- /* C and C++ comments in code. */
+/* C and C++ comments in code. */
 
- /* Strings and characters in code. */
+/* Strings and characters in code. */
 
- /* Whether in a rule or symbol action.  Specifies the translation
-    of $ and @.  */
+/* Whether in a rule or symbol action.  Specifies the translation
+of $ and @.  */
 
 /* POSIX says that a tag must be both an id and a C union member, but
    historically almost any character is allowed in a tag.  We disallow
@@ -937,7 +717,7 @@ static bool untyped_var_seen;
 /* C style identifier. Must start with letter. Will be used for
    named symbol references. Shall be kept synchronized with
    scan-gram.l "letter" and "id". */
-#line 940 "src/scan-code.c"
+#line 721 "src/scan-code.c"
 
 #define INITIAL 0
 #define SC_COMMENT 1
@@ -967,7 +747,7 @@ static bool untyped_var_seen;
 /* %if-reentrant */
 /* %if-c-only */
 
-static int yy_init_globals ( void );
+static int yy_init_globals (void );
 
 /* %endif */
 /* %if-reentrant */
@@ -977,31 +757,31 @@ static int yy_init_globals ( void );
 /* Accessor methods to globals.
    These are made visible to non-reentrant scanners for convenience. */
 
-int yylex_destroy ( void );
+int code_lex_destroy (void );
 
-int yyget_debug ( void );
+int code_get_debug (void );
 
-void yyset_debug ( int debug_flag  );
+void code_set_debug (int debug_flag  );
 
-YY_EXTRA_TYPE yyget_extra ( void );
+YY_EXTRA_TYPE code_get_extra (void );
 
-void yyset_extra ( YY_EXTRA_TYPE user_defined  );
+void code_set_extra (YY_EXTRA_TYPE user_defined  );
 
-FILE *yyget_in ( void );
+FILE *code_get_in (void );
 
-void yyset_in  ( FILE * _in_str  );
+void code_set_in  (FILE * in_str  );
 
-FILE *yyget_out ( void );
+FILE *code_get_out (void );
 
-void yyset_out  ( FILE * _out_str  );
+void code_set_out  (FILE * out_str  );
 
-                       int yyget_leng ( void );
+int code_get_leng (void );
 
-char *yyget_text ( void );
+char *code_get_text (void );
 
-int yyget_lineno ( void );
+int code_get_lineno (void );
 
-void yyset_lineno ( int _line_number  );
+void code_set_lineno (int line_number  );
 
 /* %if-bison-bridge */
 /* %endif */
@@ -1012,35 +792,34 @@ void yyset_lineno ( int _line_number  );
 
 #ifndef YY_SKIP_YYWRAP
 #ifdef __cplusplus
-extern "C" int yywrap ( void );
+extern "C" int code_wrap (void );
 #else
-extern int yywrap ( void );
+extern int code_wrap (void );
 #endif
 #endif
 
 /* %not-for-header */
-#ifndef YY_NO_UNPUT
-    
-#endif
+
 /* %ok-for-header */
 
 /* %endif */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int );
+static void yy_flex_strncpy (char *,yyconst char *,int );
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * );
+static int yy_flex_strlen (yyconst char * );
 #endif
 
 #ifndef YY_NO_INPUT
 /* %if-c-only Standard (non-C++) definition */
 /* %not-for-header */
+
 #ifdef __cplusplus
-static int yyinput ( void );
+static int yyinput (void );
 #else
-static int input ( void );
+static int input (void );
 #endif
 /* %ok-for-header */
 
@@ -1067,7 +846,7 @@ static int input ( void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( code_text, code_leng, 1, code_out )) {} } while (0)
 /* %endif */
 /* %if-c++-only C++ definition */
 /* %endif */
@@ -1082,20 +861,20 @@ static int input ( void );
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               int n; \
+               size_t n; \
                for ( n = 0; n < max_size && \
-                            (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+                            (c = getc( code_in )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
                if ( c == '\n' ) \
                        buf[n++] = (char) c; \
-               if ( c == EOF && ferror( yyin ) ) \
+               if ( c == EOF && ferror( code_in ) ) \
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
                result = n; \
                } \
        else \
                { \
                errno=0; \
-               while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+               while ( (result = fread(buf, 1, max_size, code_in))==0 && ferror(code_in)) \
                        { \
                        if( errno != EINTR) \
                                { \
@@ -1103,7 +882,7 @@ static int input ( void );
                                break; \
                                } \
                        errno=0; \
-                       clearerr(yyin); \
+                       clearerr(code_in); \
                        } \
                }\
 \
@@ -1136,9 +915,11 @@ static int input ( void );
 
 /* %if-tables-serialization structures and prototypes */
 /* %not-for-header */
+
 /* %ok-for-header */
 
 /* %not-for-header */
+
 /* %tables-yydmap generated elements */
 /* %endif */
 /* end tables serialization structures and prototypes */
@@ -1152,15 +933,15 @@ static int input ( void );
 #define YY_DECL_IS_OURS 1
 /* %if-c-only Standard (non-C++) definition */
 
-extern int yylex (void);
+extern int code_lex (void);
 
-#define YY_DECL int yylex (void)
+#define YY_DECL int code_lex (void)
 /* %endif */
 /* %if-c++-only C++ definition */
 /* %endif */
 #endif /* !YY_DECL */
 
-/* Code executed at the beginning of each rule, after yytext and yyleng
+/* Code executed at the beginning of each rule, after code_text and code_leng
  * have been set up.
  */
 #ifndef YY_USER_ACTION
@@ -1169,7 +950,7 @@ extern int yylex (void);
 
 /* Code executed at the end of each rule. */
 #ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
+#define YY_BREAK break;
 #endif
 
 /* %% [6.0] YY_RULE_SETUP definition goes here */
@@ -1177,14 +958,35 @@ extern int yylex (void);
        YY_USER_ACTION
 
 /* %not-for-header */
+
 /** The main scanner function which does all the work.
  */
 YY_DECL
 {
-       yy_state_type yy_current_state;
-       char *yy_cp, *yy_bp;
-       int yy_act;
+       register yy_state_type yy_current_state;
+       register char *yy_cp, *yy_bp;
+       register int yy_act;
     
+/* %% [7.0] user's declarations go here */
+#line 96 "src/scan-code.l"
+
+
+
+  /* This scanner is special: it is invoked only once, henceforth
+     is expected to return only once.  This initialization is
+     therefore done once per action to translate. */
+  aver (sc_context == SC_SYMBOL_ACTION
+        || sc_context == SC_RULE_ACTION
+        || sc_context == INITIAL);
+  BEGIN sc_context;
+
+
+  /*------------------------------------------------------------.
+  | Scanning a C comment.  The initial '/ *' is already eaten.  |
+  `------------------------------------------------------------*/
+
+#line 989 "src/scan-code.c"
+
        if ( !(yy_init) )
                {
                (yy_init) = 1;
@@ -1196,56 +998,35 @@ YY_DECL
                if ( ! (yy_start) )
                        (yy_start) = 1; /* first start state */
 
-               if ( ! yyin )
+               if ( ! code_in )
 /* %if-c-only */
-                       yyin = stdin;
+                       code_in = stdin;
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 
-               if ( ! yyout )
+               if ( ! code_out )
 /* %if-c-only */
-                       yyout = stdout;
+                       code_out = stdout;
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 
                if ( ! YY_CURRENT_BUFFER ) {
-                       yyensure_buffer_stack ();
+                       code_ensure_buffer_stack ();
                        YY_CURRENT_BUFFER_LVALUE =
-                               yy_create_buffer( yyin, YY_BUF_SIZE );
+                               code__create_buffer(code_in,YY_BUF_SIZE );
                }
 
-               yy_load_buffer_state(  );
+               code__load_buffer_state( );
                }
 
-       {
-/* %% [7.0] user's declarations go here */
-#line 97 "/Users/akim/src/gnu/bison/src/scan-code.l"
-
-
-
-  /* This scanner is special: it is invoked only once, henceforth
-     is expected to return only once.  This initialization is
-     therefore done once per action to translate. */
-  aver (sc_context == SC_SYMBOL_ACTION
-        || sc_context == SC_RULE_ACTION
-        || sc_context == INITIAL);
-  BEGIN sc_context;
-
-
-  /*------------------------------------------------------------.
-  | Scanning a C comment.  The initial '/ *' is already eaten.  |
-  `------------------------------------------------------------*/
-
-#line 1241 "src/scan-code.c"
-
-       while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
+       while ( 1 )             /* loops until end-of-file is reached */
                {
 /* %% [8.0] yymore()-related code goes here */
                yy_cp = (yy_c_buf_p);
 
-               /* Support of yytext. */
+               /* Support of code_text. */
                *yy_cp = (yy_hold_char);
 
                /* yy_bp points to the position in yy_ch_buf of the start of
@@ -1258,7 +1039,7 @@ YY_DECL
 yy_match:
                do
                        {
-                       YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+                       register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
                        if ( yy_accept[yy_current_state] )
                                {
                                (yy_last_accepting_state) = yy_current_state;
@@ -1268,9 +1049,9 @@ yy_match:
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
                                if ( yy_current_state >= 91 )
-                                       yy_c = yy_meta[yy_c];
+                                       yy_c = yy_meta[(unsigned int) yy_c];
                                }
-                       yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+                       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
                while ( yy_current_state != 90 );
@@ -1283,21 +1064,21 @@ yy_find_action:
 
                YY_DO_BEFORE_ACTION;
 
-/* %% [11.0] code for yylineno update goes here */
+/* %% [11.0] code for code_lineno update goes here */
 
 do_action:     /* This label is used only to access EOF actions. */
 
 /* %% [12.0] debug code goes here */
-               if ( yy_flex_debug )
+               if ( code__flex_debug )
                        {
                        if ( yy_act == 0 )
                                fprintf( stderr, "--scanner backing up\n" );
                        else if ( yy_act < 18 )
                                fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
-                                        (long)yy_rule_linenum[yy_act], yytext );
+                                        (long)yy_rule_linenum[yy_act], code_text );
                        else if ( yy_act == 18 )
                                fprintf( stderr, "--accepting default rule (\"%s\")\n",
-                                        yytext );
+                                        code_text );
                        else if ( yy_act == 19 )
                                fprintf( stderr, "--(end of buffer or a NUL)\n" );
                        else
@@ -1317,7 +1098,7 @@ do_action:        /* This label is used only to access EOF actions. */
 case 1:
 /* rule 1 can match eol */
 YY_RULE_SETUP
-#line 115 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 114 "src/scan-code.l"
 STRING_GROW; BEGIN sc_context;
        YY_BREAK
 
@@ -1329,13 +1110,13 @@ STRING_GROW; BEGIN sc_context;
 case 2:
 /* rule 2 can match eol */
 YY_RULE_SETUP
-#line 125 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 124 "src/scan-code.l"
 STRING_GROW; BEGIN sc_context;
        YY_BREAK
 case 3:
 /* rule 3 can match eol */
 YY_RULE_SETUP
-#line 126 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 125 "src/scan-code.l"
 STRING_GROW;
        YY_BREAK
 
@@ -1347,7 +1128,7 @@ STRING_GROW;
 case 4:
 /* rule 4 can match eol */
 YY_RULE_SETUP
-#line 136 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 135 "src/scan-code.l"
 STRING_GROW;
        YY_BREAK
 
@@ -1355,7 +1136,7 @@ STRING_GROW;
 
 case 5:
 YY_RULE_SETUP
-#line 141 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 140 "src/scan-code.l"
 STRING_GROW; BEGIN sc_context;
        YY_BREAK
 
@@ -1363,7 +1144,7 @@ STRING_GROW; BEGIN sc_context;
 
 case 6:
 YY_RULE_SETUP
-#line 146 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 145 "src/scan-code.l"
 STRING_GROW; BEGIN sc_context;
        YY_BREAK
 
@@ -1371,32 +1152,32 @@ STRING_GROW; BEGIN sc_context;
 
 case 7:
 YY_RULE_SETUP
-#line 152 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 151 "src/scan-code.l"
 STRING_GROW; BEGIN SC_CHARACTER;
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 153 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 152 "src/scan-code.l"
 STRING_GROW; BEGIN SC_STRING;
        YY_BREAK
 case 9:
 /* rule 9 can match eol */
 YY_RULE_SETUP
-#line 154 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 153 "src/scan-code.l"
 STRING_GROW; BEGIN SC_COMMENT;
        YY_BREAK
 case 10:
 /* rule 10 can match eol */
 YY_RULE_SETUP
-#line 155 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 154 "src/scan-code.l"
 STRING_GROW; BEGIN SC_LINE_COMMENT;
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 157 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 156 "src/scan-code.l"
 {
-    complain (loc, Wother, _("stray '%s'"), yytext);
-    obstack_escape (&obstack_for_string, yytext);
+    complain (loc, Wother, _("stray '%s'"), code_text);
+    obstack_escape (&obstack_for_string, code_text);
   }
        YY_BREAK
 
@@ -1404,20 +1185,20 @@ YY_RULE_SETUP
 
 case 12:
 YY_RULE_SETUP
-#line 165 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 164 "src/scan-code.l"
 {
     ref_tail_fields = NULL;
-    handle_action_dollar (self->rule, yytext, *loc);
+    handle_action_dollar (self->rule, code_text, *loc);
     if (ref_tail_fields)
       obstack_sgrow (&obstack_for_string, ref_tail_fields);
   }
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 171 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 170 "src/scan-code.l"
 {
     ref_tail_fields = NULL;
-    handle_action_at (self->rule, yytext, *loc);
+    handle_action_at (self->rule, code_text, *loc);
     if (ref_tail_fields)
       obstack_sgrow (&obstack_for_string, ref_tail_fields);
   }
@@ -1427,10 +1208,10 @@ YY_RULE_SETUP
 
 case 14:
 YY_RULE_SETUP
-#line 181 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 180 "src/scan-code.l"
 {
     const char *type_name = NULL;
-    fetch_type_name (yytext + 1, &type_name, *loc)[-1] = 0;
+    fetch_type_name (code_text + 1, &type_name, *loc)[-1] = 0;
     obstack_sgrow (&obstack_for_string, "]b4_dollar_dollar(");
     obstack_quote (&obstack_for_string, type_name);
     obstack_sgrow (&obstack_for_string, ")[");
@@ -1439,7 +1220,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 189 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 188 "src/scan-code.l"
 {
     obstack_sgrow (&obstack_for_string, "]b4_at_dollar[");
     muscle_percent_define_ensure("locations", the_location, true);
@@ -1451,14 +1232,14 @@ YY_RULE_SETUP
 /* Escape M4 quoting characters in C code.  */
 case 16:
 YY_RULE_SETUP
-#line 199 "/Users/akim/src/gnu/bison/src/scan-code.l"
-obstack_escape (&obstack_for_string, yytext);
+#line 198 "src/scan-code.l"
+obstack_escape (&obstack_for_string, code_text);
        YY_BREAK
 /* By default, grow the string obstack with the input.  */
 case 17:
 /* rule 17 can match eol */
 YY_RULE_SETUP
-#line 202 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 201 "src/scan-code.l"
 STRING_GROW;
        YY_BREAK
 /* End of processing. */
@@ -1469,16 +1250,16 @@ case YY_STATE_EOF(SC_STRING):
 case YY_STATE_EOF(SC_CHARACTER):
 case YY_STATE_EOF(SC_RULE_ACTION):
 case YY_STATE_EOF(SC_SYMBOL_ACTION):
-#line 205 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 204 "src/scan-code.l"
 STRING_FINISH; return last_string;
        YY_BREAK
 
 case 18:
 YY_RULE_SETUP
-#line 208 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 207 "src/scan-code.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
        YY_BREAK
-#line 1481 "src/scan-code.c"
+#line 1263 "src/scan-code.c"
 
        case YY_END_OF_BUFFER:
                {
@@ -1493,19 +1274,15 @@ YY_FATAL_ERROR( "flex scanner jammed" );
                        {
                        /* We're scanning a new file or input source.  It's
                         * possible that this happened because the user
-                        * just pointed yyin at a new source and called
-                        * yylex().  If so, then we have to assure
+                        * just pointed code_in at a new source and called
+                        * code_lex().  If so, then we have to assure
                         * consistency between YY_CURRENT_BUFFER and our
                         * globals.  Here is the right place to do so, because
                         * this is the first action (other than possibly a
                         * back-up) that will match for the new input source.
                         */
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-/* %if-c-only */
-                       YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+                       YY_CURRENT_BUFFER_LVALUE->yy_input_file = code_in;
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
                        }
 
@@ -1560,11 +1337,11 @@ YY_FATAL_ERROR( "flex scanner jammed" );
                                {
                                (yy_did_buffer_switch_on_eof) = 0;
 
-                               if ( yywrap(  ) )
+                               if ( code_wrap( ) )
                                        {
                                        /* Note: because we've taken care in
                                         * yy_get_next_buffer() to have set up
-                                        * yytext, we can now set up
+                                        * code_text, we can now set up
                                         * yy_c_buf_p so that if some total
                                         * hoser (like flex itself) wants to
                                         * call the scanner after we return the
@@ -1613,12 +1390,12 @@ YY_FATAL_ERROR( "flex scanner jammed" );
                        "fatal flex scanner internal error--no action found" );
        } /* end of action switch */
                } /* end of scanning one token */
-       } /* end of user's declarations */
-} /* end of yylex */
+} /* end of code_lex */
 /* %ok-for-header */
 
 /* %if-c++-only */
 /* %not-for-header */
+
 /* %ok-for-header */
 
 /* %endif */
@@ -1636,9 +1413,9 @@ static int yy_get_next_buffer (void)
 /* %if-c++-only */
 /* %endif */
 {
-       char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-       char *source = (yytext_ptr);
-       int number_to_move, i;
+       register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+       register char *source = (yytext_ptr);
+       register int number_to_move, i;
        int ret_val;
 
        if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -1667,7 +1444,7 @@ static int yy_get_next_buffer (void)
        /* Try to read more data. */
 
        /* First move last chars to start of buffer. */
-       number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+       number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
 
        for ( i = 0; i < number_to_move; ++i )
                *(dest++) = *(source++);
@@ -1687,7 +1464,7 @@ static int yy_get_next_buffer (void)
                        { /* Not enough room in the buffer - grow it. */
 
                        /* just a shorter name for the current buffer */
-                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
 
                        int yy_c_buf_p_offset =
                                (int) ((yy_c_buf_p) - b->yy_ch_buf);
@@ -1703,12 +1480,11 @@ static int yy_get_next_buffer (void)
 
                                b->yy_ch_buf = (char *)
                                        /* Include room in for 2 EOB chars. */
-                                       yyrealloc( (void *) b->yy_ch_buf,
-                                                        (yy_size_t) (b->yy_buf_size + 2)  );
+                                       code_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
                                }
                        else
                                /* Can't grow it, we don't own it. */
-                               b->yy_ch_buf = NULL;
+                               b->yy_ch_buf = 0;
 
                        if ( ! b->yy_ch_buf )
                                YY_FATAL_ERROR(
@@ -1726,7 +1502,7 @@ static int yy_get_next_buffer (void)
 
                /* Read in more data. */
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-                       (yy_n_chars), num_to_read );
+                       (yy_n_chars), (size_t) num_to_read );
 
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
                }
@@ -1736,7 +1512,7 @@ static int yy_get_next_buffer (void)
                if ( number_to_move == YY_MORE_ADJ )
                        {
                        ret_val = EOB_ACT_END_OF_FILE;
-                       yyrestart( yyin  );
+                       code_restart(code_in  );
                        }
 
                else
@@ -1750,15 +1526,12 @@ static int yy_get_next_buffer (void)
        else
                ret_val = EOB_ACT_CONTINUE_SCAN;
 
-       if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+       if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
                /* Extend the array by 50%, plus the number we really need. */
-               int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
-                       (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
+               yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) code_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
                if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
                        YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-               /* "- 2" to take care of EOB's */
-               YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
        }
 
        (yy_n_chars) += number_to_move;
@@ -1774,13 +1547,14 @@ static int yy_get_next_buffer (void)
 
 /* %if-c-only */
 /* %not-for-header */
+
     static yy_state_type yy_get_previous_state (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
-       yy_state_type yy_current_state;
-       char *yy_cp;
+       register yy_state_type yy_current_state;
+       register char *yy_cp;
     
 /* %% [15.0] code to get the start state into yy_current_state goes here */
        yy_current_state = (yy_start);
@@ -1788,7 +1562,7 @@ static int yy_get_next_buffer (void)
        for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
                {
 /* %% [16.0] code to find the next state goes here */
-               YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 18);
+               register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 18);
                if ( yy_accept[yy_current_state] )
                        {
                        (yy_last_accepting_state) = yy_current_state;
@@ -1798,9 +1572,9 @@ static int yy_get_next_buffer (void)
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
                        if ( yy_current_state >= 91 )
-                               yy_c = yy_meta[yy_c];
+                               yy_c = yy_meta[(unsigned int) yy_c];
                        }
-               yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+               yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                }
 
        return yy_current_state;
@@ -1817,11 +1591,11 @@ static int yy_get_next_buffer (void)
 /* %if-c++-only */
 /* %endif */
 {
-       int yy_is_jam;
+       register int yy_is_jam;
     /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
-       char *yy_cp = (yy_c_buf_p);
+       register char *yy_cp = (yy_c_buf_p);
 
-       YY_CHAR yy_c = 18;
+       register YY_CHAR yy_c = 18;
        if ( yy_accept[yy_current_state] )
                {
                (yy_last_accepting_state) = yy_current_state;
@@ -1831,19 +1605,17 @@ static int yy_get_next_buffer (void)
                {
                yy_current_state = (int) yy_def[yy_current_state];
                if ( yy_current_state >= 91 )
-                       yy_c = yy_meta[yy_c];
+                       yy_c = yy_meta[(unsigned int) yy_c];
                }
-       yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
        yy_is_jam = (yy_current_state == 90);
 
-               return yy_is_jam ? 0 : yy_current_state;
+       return yy_is_jam ? 0 : yy_current_state;
 }
 
-#ifndef YY_NO_UNPUT
 /* %if-c-only */
 
 /* %endif */
-#endif
 
 /* %if-c-only */
 #ifndef YY_NO_INPUT
@@ -1873,7 +1645,7 @@ static int yy_get_next_buffer (void)
 
                else
                        { /* need more input */
-                       int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+                       int offset = (yy_c_buf_p) - (yytext_ptr);
                        ++(yy_c_buf_p);
 
                        switch ( yy_get_next_buffer(  ) )
@@ -1890,14 +1662,14 @@ static int yy_get_next_buffer (void)
                                         */
 
                                        /* Reset buffer status. */
-                                       yyrestart( yyin );
+                                       code_restart(code_in );
 
                                        /*FALLTHROUGH*/
 
                                case EOB_ACT_END_OF_FILE:
                                        {
-                                       if ( yywrap(  ) )
-                                               return 0;
+                                       if ( code_wrap( ) )
+                                               return EOF;
 
                                        if ( ! (yy_did_buffer_switch_on_eof) )
                                                YY_NEW_FILE;
@@ -1916,10 +1688,10 @@ static int yy_get_next_buffer (void)
                }
 
        c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
-       *(yy_c_buf_p) = '\0';   /* preserve yytext */
+       *(yy_c_buf_p) = '\0';   /* preserve code_text */
        (yy_hold_char) = *++(yy_c_buf_p);
 
-/* %% [19.0] update BOL and yylineno */
+/* %% [19.0] update BOL and code_lineno */
 
        return c;
 }
@@ -1933,31 +1705,28 @@ static int yy_get_next_buffer (void)
  * @note This function does not reset the start condition to @c INITIAL .
  */
 /* %if-c-only */
-    void yyrestart  (FILE * input_file )
+    void code_restart  (FILE * input_file )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
     
        if ( ! YY_CURRENT_BUFFER ){
-        yyensure_buffer_stack ();
+        code_ensure_buffer_stack ();
                YY_CURRENT_BUFFER_LVALUE =
-            yy_create_buffer( yyin, YY_BUF_SIZE );
+            code__create_buffer(code_in,YY_BUF_SIZE );
        }
 
-       yy_init_buffer( YY_CURRENT_BUFFER, input_file );
-       yy_load_buffer_state(  );
+       code__init_buffer(YY_CURRENT_BUFFER,input_file );
+       code__load_buffer_state( );
 }
 
-/* %if-c++-only */
-/* %endif */
-
 /** Switch to a different input buffer.
  * @param new_buffer The new input buffer.
  * 
  */
 /* %if-c-only */
-    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+    void code__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -1965,10 +1734,10 @@ static int yy_get_next_buffer (void)
     
        /* TODO. We should be able to replace this entire function body
         * with
-        *              yypop_buffer_state();
-        *              yypush_buffer_state(new_buffer);
+        *              code_pop_buffer_state();
+        *              code_push_buffer_state(new_buffer);
      */
-       yyensure_buffer_stack ();
+       code_ensure_buffer_stack ();
        if ( YY_CURRENT_BUFFER == new_buffer )
                return;
 
@@ -1981,29 +1750,25 @@ static int yy_get_next_buffer (void)
                }
 
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
-       yy_load_buffer_state(  );
+       code__load_buffer_state( );
 
        /* We don't actually know whether we did this switch during
-        * EOF (yywrap()) processing, but the only time this flag
-        * is looked at is after yywrap() is called, so it's safe
+        * EOF (code_wrap()) processing, but the only time this flag
+        * is looked at is after code_wrap() is called, so it's safe
         * to go ahead and always set it.
         */
        (yy_did_buffer_switch_on_eof) = 1;
 }
 
 /* %if-c-only */
-static void yy_load_buffer_state  (void)
+static void code__load_buffer_state  (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
        (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-/* %if-c-only */
-       yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+       code_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
        (yy_hold_char) = *(yy_c_buf_p);
 }
 
@@ -2014,42 +1779,39 @@ static void yy_load_buffer_state  (void)
  * @return the allocated buffer state.
  */
 /* %if-c-only */
-    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
+    YY_BUFFER_STATE code__create_buffer  (FILE * file, int  size )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
        YY_BUFFER_STATE b;
     
-       b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
+       b = (YY_BUFFER_STATE) code_alloc(sizeof( struct yy_buffer_state )  );
        if ( ! b )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+               YY_FATAL_ERROR( "out of dynamic memory in code__create_buffer()" );
 
        b->yy_buf_size = size;
 
        /* yy_ch_buf has to be 2 characters longer than the size given because
         * we need to put in 2 end-of-buffer characters.
         */
-       b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
+       b->yy_ch_buf = (char *) code_alloc(b->yy_buf_size + 2  );
        if ( ! b->yy_ch_buf )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+               YY_FATAL_ERROR( "out of dynamic memory in code__create_buffer()" );
 
        b->yy_is_our_buffer = 1;
 
-       yy_init_buffer( b, file );
+       code__init_buffer(b,file );
 
        return b;
 }
 
-/* %if-c++-only */
-/* %endif */
-
 /** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with code__create_buffer()
  * 
  */
 /* %if-c-only */
-    void yy_delete_buffer (YY_BUFFER_STATE  b )
+    void code__delete_buffer (YY_BUFFER_STATE  b )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2062,17 +1824,24 @@ static void yy_load_buffer_state  (void)
                YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
 
        if ( b->yy_is_our_buffer )
-               yyfree( (void *) b->yy_ch_buf  );
+               code_free((void *) b->yy_ch_buf  );
 
-       yyfree( (void *) b  );
+       code_free((void *) b  );
 }
 
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
+ * such as during a code_restart() or at EOF.
  */
 /* %if-c-only */
-    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+    static void code__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2080,17 +1849,13 @@ static void yy_load_buffer_state  (void)
 {
        int oerrno = errno;
     
-       yy_flush_buffer( b );
+       code__flush_buffer(b );
 
-/* %if-c-only */
        b->yy_input_file = file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
        b->yy_fill_buffer = 1;
 
-    /* If b is the current buffer, then yy_init_buffer was _probably_
-     * called from yyrestart() or through yy_get_next_buffer.
+    /* If b is the current buffer, then code__init_buffer was _probably_
+     * called from code_restart() or through yy_get_next_buffer.
      * In that case, we don't want to reset the lineno or column.
      */
     if (b != YY_CURRENT_BUFFER){
@@ -2113,7 +1878,7 @@ static void yy_load_buffer_state  (void)
  * 
  */
 /* %if-c-only */
-    void yy_flush_buffer (YY_BUFFER_STATE  b )
+    void code__flush_buffer (YY_BUFFER_STATE  b )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2136,7 +1901,7 @@ static void yy_load_buffer_state  (void)
        b->yy_buffer_status = YY_BUFFER_NEW;
 
        if ( b == YY_CURRENT_BUFFER )
-               yy_load_buffer_state(  );
+               code__load_buffer_state( );
 }
 
 /* %if-c-or-c++ */
@@ -2147,7 +1912,7 @@ static void yy_load_buffer_state  (void)
  *  
  */
 /* %if-c-only */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void code_push_buffer_state (YY_BUFFER_STATE new_buffer )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2155,9 +1920,9 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
        if (new_buffer == NULL)
                return;
 
-       yyensure_buffer_stack();
+       code_ensure_buffer_stack();
 
-       /* This block is copied from yy_switch_to_buffer. */
+       /* This block is copied from code__switch_to_buffer. */
        if ( YY_CURRENT_BUFFER )
                {
                /* Flush out information for old buffer. */
@@ -2171,8 +1936,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
                (yy_buffer_stack_top)++;
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
-       /* copied from yy_switch_to_buffer. */
-       yy_load_buffer_state(  );
+       /* copied from code__switch_to_buffer. */
+       code__load_buffer_state( );
        (yy_did_buffer_switch_on_eof) = 1;
 }
 /* %endif */
@@ -2183,7 +1948,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
  *  
  */
 /* %if-c-only */
-void yypop_buffer_state (void)
+void code_pop_buffer_state (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2191,13 +1956,13 @@ void yypop_buffer_state (void)
        if (!YY_CURRENT_BUFFER)
                return;
 
-       yy_delete_buffer(YY_CURRENT_BUFFER );
+       code__delete_buffer(YY_CURRENT_BUFFER );
        YY_CURRENT_BUFFER_LVALUE = NULL;
        if ((yy_buffer_stack_top) > 0)
                --(yy_buffer_stack_top);
 
        if (YY_CURRENT_BUFFER) {
-               yy_load_buffer_state(  );
+               code__load_buffer_state( );
                (yy_did_buffer_switch_on_eof) = 1;
        }
 }
@@ -2208,12 +1973,12 @@ void yypop_buffer_state (void)
  *  Guarantees space for at least one push.
  */
 /* %if-c-only */
-static void yyensure_buffer_stack (void)
+static void code_ensure_buffer_stack (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
-       yy_size_t num_to_alloc;
+       int num_to_alloc;
     
        if (!(yy_buffer_stack)) {
 
@@ -2221,15 +1986,15 @@ static void yyensure_buffer_stack (void)
                 * scanner will even need a stack. We use 2 instead of 1 to avoid an
                 * immediate realloc on the next call.
          */
-      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
-               (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+               num_to_alloc = 1;
+               (yy_buffer_stack) = (struct yy_buffer_state**)code_alloc
                                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
                                                                );
                if ( ! (yy_buffer_stack) )
-                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+                       YY_FATAL_ERROR( "out of dynamic memory in code_ensure_buffer_stack()" );
+                                                                 
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+                               
                (yy_buffer_stack_max) = num_to_alloc;
                (yy_buffer_stack_top) = 0;
                return;
@@ -2238,15 +2003,15 @@ static void yyensure_buffer_stack (void)
        if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 
                /* Increase the buffer to prepare for a possible push. */
-               yy_size_t grow_size = 8 /* arbitrary grow size */;
+               int grow_size = 8 /* arbitrary grow size */;
 
                num_to_alloc = (yy_buffer_stack_max) + grow_size;
-               (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+               (yy_buffer_stack) = (struct yy_buffer_state**)code_realloc
                                                                ((yy_buffer_stack),
                                                                num_to_alloc * sizeof(struct yy_buffer_state*)
                                                                );
                if ( ! (yy_buffer_stack) )
-                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+                       YY_FATAL_ERROR( "out of dynamic memory in code_ensure_buffer_stack()" );
 
                /* zero only the new slots.*/
                memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2260,9 +2025,9 @@ static void yyensure_buffer_stack (void)
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
  * 
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object. 
  */
-YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
+YY_BUFFER_STATE code__scan_buffer  (char * base, yy_size_t  size )
 {
        YY_BUFFER_STATE b;
     
@@ -2270,53 +2035,53 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
             base[size-1] != YY_END_OF_BUFFER_CHAR )
                /* They forgot to leave room for the EOB's. */
-               return NULL;
+               return 0;
 
-       b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
+       b = (YY_BUFFER_STATE) code_alloc(sizeof( struct yy_buffer_state )  );
        if ( ! b )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+               YY_FATAL_ERROR( "out of dynamic memory in code__scan_buffer()" );
 
-       b->yy_buf_size = (int) (size - 2);      /* "- 2" to take care of EOB's */
+       b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
        b->yy_buf_pos = b->yy_ch_buf = base;
        b->yy_is_our_buffer = 0;
-       b->yy_input_file = NULL;
+       b->yy_input_file = 0;
        b->yy_n_chars = b->yy_buf_size;
        b->yy_is_interactive = 0;
        b->yy_at_bol = 1;
        b->yy_fill_buffer = 0;
        b->yy_buffer_status = YY_BUFFER_NEW;
 
-       yy_switch_to_buffer( b  );
+       code__switch_to_buffer(b  );
 
        return b;
 }
 /* %endif */
 
 /* %if-c-only */
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to code_lex() will
  * scan from a @e copy of @a str.
  * @param yystr a NUL-terminated string to scan
  * 
  * @return the newly allocated buffer state object.
  * @note If you want to scan bytes that may contain NUL values, then use
- *       yy_scan_bytes() instead.
+ *       code__scan_bytes() instead.
  */
-YY_BUFFER_STATE yy_scan_string (const char * yystr )
+YY_BUFFER_STATE code__scan_string (yyconst char * yystr )
 {
     
-       return yy_scan_bytes( yystr, (int) strlen(yystr) );
+       return code__scan_bytes(yystr,strlen(yystr) );
 }
 /* %endif */
 
 /* %if-c-only */
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to code_lex() will
  * scan from a @e copy of @a bytes.
  * @param yybytes the byte buffer to scan
  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */
-YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
+YY_BUFFER_STATE code__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
 {
        YY_BUFFER_STATE b;
        char *buf;
@@ -2324,19 +2089,19 @@ YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
        int i;
     
        /* Get memory for full buffer, including space for trailing EOB's. */
-       n = (yy_size_t) (_yybytes_len + 2);
-       buf = (char *) yyalloc( n  );
+       n = _yybytes_len + 2;
+       buf = (char *) code_alloc(n  );
        if ( ! buf )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+               YY_FATAL_ERROR( "out of dynamic memory in code__scan_bytes()" );
 
        for ( i = 0; i < _yybytes_len; ++i )
                buf[i] = yybytes[i];
 
        buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
 
-       b = yy_scan_buffer( buf, n );
+       b = code__scan_buffer(buf,n );
        if ( ! b )
-               YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+               YY_FATAL_ERROR( "bad buffer in code__scan_bytes()" );
 
        /* It's okay to grow etc. this buffer, and we should throw it
         * away when we're done.
@@ -2352,9 +2117,9 @@ YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
 #endif
 
 /* %if-c-only */
-static void yynoreturn yy_fatal_error (const char* msg )
+static void yy_fatal_error (yyconst char* msg )
 {
-                       fprintf( stderr, "%s\n", msg );
+       (void) fprintf( stderr, "%s\n", msg );
        exit( YY_EXIT_FAILURE );
 }
 /* %endif */
@@ -2367,14 +2132,14 @@ static void yynoreturn yy_fatal_error (const char* msg )
 #define yyless(n) \
        do \
                { \
-               /* Undo effects of setting up yytext. */ \
+               /* Undo effects of setting up code_text. */ \
         int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
-               yytext[yyleng] = (yy_hold_char); \
-               (yy_c_buf_p) = yytext + yyless_macro_arg; \
+               code_text[code_leng] = (yy_hold_char); \
+               (yy_c_buf_p) = code_text + yyless_macro_arg; \
                (yy_hold_char) = *(yy_c_buf_p); \
                *(yy_c_buf_p) = '\0'; \
-               yyleng = yyless_macro_arg; \
+               code_leng = yyless_macro_arg; \
                } \
        while ( 0 )
 
@@ -2387,82 +2152,82 @@ static void yynoreturn yy_fatal_error (const char* msg )
 /** Get the current line number.
  * 
  */
-int yyget_lineno  (void)
+int code_get_lineno  (void)
 {
-    
-    return yylineno;
+        
+    return code_lineno;
 }
 
 /** Get the input stream.
  * 
  */
-FILE *yyget_in  (void)
+FILE *code_get_in  (void)
 {
-        return yyin;
+        return code_in;
 }
 
 /** Get the output stream.
  * 
  */
-FILE *yyget_out  (void)
+FILE *code_get_out  (void)
 {
-        return yyout;
+        return code_out;
 }
 
 /** Get the length of the current token.
  * 
  */
-int yyget_leng  (void)
+int code_get_leng  (void)
 {
-        return yyleng;
+        return code_leng;
 }
 
 /** Get the current token.
  * 
  */
 
-char *yyget_text  (void)
+char *code_get_text  (void)
 {
-        return yytext;
+        return code_text;
 }
 
 /* %if-reentrant */
 /* %endif */
 
 /** Set the current line number.
- * @param _line_number line number
+ * @param line_number
  * 
  */
-void yyset_lineno (int  _line_number )
+void code_set_lineno (int  line_number )
 {
     
-    yylineno = _line_number;
+    code_lineno = line_number;
 }
 
 /** Set the input stream. This does not discard the current
  * input buffer.
- * @param _in_str A readable stream.
+ * @param in_str A readable stream.
  * 
- * @see yy_switch_to_buffer
+ * @see code__switch_to_buffer
  */
-void yyset_in (FILE *  _in_str )
+void code_set_in (FILE *  in_str )
 {
-        yyin = _in_str ;
+        code_in = in_str ;
 }
 
-void yyset_out (FILE *  _out_str )
+void code_set_out (FILE *  out_str )
 {
-        yyout = _out_str ;
+        code_out = out_str ;
 }
 
-int yyget_debug  (void)
+int code_get_debug  (void)
 {
-        return yy_flex_debug;
+        return code__flex_debug;
 }
 
-void yyset_debug (int  _bdebug )
+void code_set_debug (int  bdebug )
 {
-        yy_flex_debug = _bdebug ;
+        code__flex_debug = bdebug ;
 }
 
 /* %endif */
@@ -2476,50 +2241,50 @@ void yyset_debug (int  _bdebug )
 static int yy_init_globals (void)
 {
         /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from yylex_destroy(), so don't allocate here.
+     * This function is called from code_lex_destroy(), so don't allocate here.
      */
 
-    (yy_buffer_stack) = NULL;
+    (yy_buffer_stack) = 0;
     (yy_buffer_stack_top) = 0;
     (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = NULL;
+    (yy_c_buf_p) = (char *) 0;
     (yy_init) = 0;
     (yy_start) = 0;
 
 /* Defined in main.c */
 #ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
+    code_in = stdin;
+    code_out = stdout;
 #else
-    yyin = NULL;
-    yyout = NULL;
+    code_in = (FILE *) 0;
+    code_out = (FILE *) 0;
 #endif
 
     /* For future reference: Set errno on error, since we are called by
-     * yylex_init()
+     * code_lex_init()
      */
     return 0;
 }
 /* %endif */
 
 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy  (void)
+/* code_lex_destroy is for both reentrant and non-reentrant scanners. */
+int code_lex_destroy  (void)
 {
     
     /* Pop the buffer stack, destroying each element. */
        while(YY_CURRENT_BUFFER){
-               yy_delete_buffer( YY_CURRENT_BUFFER  );
+               code__delete_buffer(YY_CURRENT_BUFFER  );
                YY_CURRENT_BUFFER_LVALUE = NULL;
-               yypop_buffer_state();
+               code_pop_buffer_state();
        }
 
        /* Destroy the stack itself. */
-       yyfree((yy_buffer_stack) );
+       code_free((yy_buffer_stack) );
        (yy_buffer_stack) = NULL;
 
     /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * yylex() is called, initialization will occur. */
+     * code_lex() is called, initialization will occur. */
     yy_init_globals( );
 
 /* %if-reentrant */
@@ -2533,19 +2298,18 @@ int yylex_destroy  (void)
  */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 {
-               
-       int i;
+       register int i;
        for ( i = 0; i < n; ++i )
                s1[i] = s2[i];
 }
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s )
+static int yy_flex_strlen (yyconst char * s )
 {
-       int n;
+       register int n;
        for ( n = 0; s[n]; ++n )
                ;
 
@@ -2553,14 +2317,13 @@ static int yy_flex_strlen (const char * s )
 }
 #endif
 
-void *yyalloc (yy_size_t  size )
+void *code_alloc (yy_size_t  size )
 {
-                       return malloc(size);
+       return (void *) malloc( size );
 }
 
-void *yyrealloc  (void * ptr, yy_size_t  size )
+void *code_realloc  (void * ptr, yy_size_t  size )
 {
-               
        /* The cast to (char *) in the following accommodates both
         * implementations that use char* generic pointers, and those
         * that use void* generic pointers.  It works with the latter
@@ -2568,12 +2331,12 @@ void *yyrealloc  (void * ptr, yy_size_t  size )
         * any pointer type to void*, and deal with argument conversions
         * as though doing an assignment.
         */
-       return realloc(ptr, size);
+       return (void *) realloc( (char *) ptr, size );
 }
 
-void yyfree (void * ptr )
+void code_free (void * ptr )
 {
-                       free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
+       free( (char *) ptr );   /* see code_realloc() for (char *) cast */
 }
 
 /* %if-tables-serialization definitions */
@@ -2583,7 +2346,8 @@ void yyfree (void * ptr )
 
 /* %ok-for-header */
 
-#line 208 "/Users/akim/src/gnu/bison/src/scan-code.l"
+#line 207 "src/scan-code.l"
+
 
 
 static inline bool
@@ -3158,14 +2922,14 @@ translate_action (code_props *self, int sc_context)
   if (!initialized)
     {
       obstack_init (&obstack_for_string);
-      yy_flex_debug = 0;
+      code__flex_debug = 0;
       initialized = true;
     }
 
   loc->start = loc->end = self->location.start;
-  yy_switch_to_buffer (yy_scan_string (self->code));
+  code__switch_to_buffer (code__scan_string (self->code));
   res = code_lex (self, sc_context);
-  yy_delete_buffer (YY_CURRENT_BUFFER);
+  code__delete_buffer (YY_CURRENT_BUFFER);
 
   return res;
 }
@@ -3248,6 +3012,6 @@ code_scanner_free (void)
   variant_table_free ();
 
   /* Reclaim Flex's buffers.  */
-  yylex_destroy ();
+  code_lex_destroy ();
 }
 
index c59fd8c..d4ac4f8 100644 (file)
@@ -1,27 +1,22 @@
-#line 1 "src/scan-gram.c"
+#line 2 "src/scan-gram.c"
 
-#line 3 "src/scan-gram.c"
+#line 4 "src/scan-gram.c"
 
 #define  YY_INT_ALIGNED short int
 
 /* A lexical scanner generated by flex */
 
 /* %not-for-header */
+
 /* %if-c-only */
 /* %if-not-reentrant */
 #define yy_create_buffer gram__create_buffer
 #define yy_delete_buffer gram__delete_buffer
-#define yy_scan_buffer gram__scan_buffer
-#define yy_scan_string gram__scan_string
-#define yy_scan_bytes gram__scan_bytes
+#define yy_flex_debug gram__flex_debug
 #define yy_init_buffer gram__init_buffer
 #define yy_flush_buffer gram__flush_buffer
 #define yy_load_buffer_state gram__load_buffer_state
 #define yy_switch_to_buffer gram__switch_to_buffer
-#define yypush_buffer_state gram_push_buffer_state
-#define yypop_buffer_state gram_pop_buffer_state
-#define yyensure_buffer_stack gram_ensure_buffer_stack
-#define yy_flex_debug gram__flex_debug
 #define yyin gram_in
 #define yyleng gram_leng
 #define yylex gram_lex
@@ -40,8 +35,8 @@
 
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
 /* %endif */
 
 /* %if-c-only */
-#ifdef yy_create_buffer
-#define gram__create_buffer_ALREADY_DEFINED
-#else
-#define yy_create_buffer gram__create_buffer
-#endif
-
-#ifdef yy_delete_buffer
-#define gram__delete_buffer_ALREADY_DEFINED
-#else
-#define yy_delete_buffer gram__delete_buffer
-#endif
-
-#ifdef yy_scan_buffer
-#define gram__scan_buffer_ALREADY_DEFINED
-#else
-#define yy_scan_buffer gram__scan_buffer
-#endif
-
-#ifdef yy_scan_string
-#define gram__scan_string_ALREADY_DEFINED
-#else
-#define yy_scan_string gram__scan_string
-#endif
-
-#ifdef yy_scan_bytes
-#define gram__scan_bytes_ALREADY_DEFINED
-#else
-#define yy_scan_bytes gram__scan_bytes
-#endif
-
-#ifdef yy_init_buffer
-#define gram__init_buffer_ALREADY_DEFINED
-#else
-#define yy_init_buffer gram__init_buffer
-#endif
-
-#ifdef yy_flush_buffer
-#define gram__flush_buffer_ALREADY_DEFINED
-#else
-#define yy_flush_buffer gram__flush_buffer
-#endif
-
-#ifdef yy_load_buffer_state
-#define gram__load_buffer_state_ALREADY_DEFINED
-#else
-#define yy_load_buffer_state gram__load_buffer_state
-#endif
-
-#ifdef yy_switch_to_buffer
-#define gram__switch_to_buffer_ALREADY_DEFINED
-#else
-#define yy_switch_to_buffer gram__switch_to_buffer
-#endif
-
-#ifdef yypush_buffer_state
-#define gram_push_buffer_state_ALREADY_DEFINED
-#else
-#define yypush_buffer_state gram_push_buffer_state
-#endif
-
-#ifdef yypop_buffer_state
-#define gram_pop_buffer_state_ALREADY_DEFINED
-#else
-#define yypop_buffer_state gram_pop_buffer_state
-#endif
-
-#ifdef yyensure_buffer_stack
-#define gram_ensure_buffer_stack_ALREADY_DEFINED
-#else
-#define yyensure_buffer_stack gram_ensure_buffer_stack
-#endif
-
-#ifdef yylex
-#define gram_lex_ALREADY_DEFINED
-#else
-#define yylex gram_lex
-#endif
-
-#ifdef yyrestart
-#define gram_restart_ALREADY_DEFINED
-#else
-#define yyrestart gram_restart
-#endif
-
-#ifdef yylex_init
-#define gram_lex_init_ALREADY_DEFINED
-#else
-#define yylex_init gram_lex_init
-#endif
-
-#ifdef yylex_init_extra
-#define gram_lex_init_extra_ALREADY_DEFINED
-#else
-#define yylex_init_extra gram_lex_init_extra
-#endif
-
-#ifdef yylex_destroy
-#define gram_lex_destroy_ALREADY_DEFINED
-#else
-#define yylex_destroy gram_lex_destroy
-#endif
-
-#ifdef yyget_debug
-#define gram_get_debug_ALREADY_DEFINED
-#else
-#define yyget_debug gram_get_debug
-#endif
-
-#ifdef yyset_debug
-#define gram_set_debug_ALREADY_DEFINED
-#else
-#define yyset_debug gram_set_debug
-#endif
-
-#ifdef yyget_extra
-#define gram_get_extra_ALREADY_DEFINED
-#else
-#define yyget_extra gram_get_extra
-#endif
-
-#ifdef yyset_extra
-#define gram_set_extra_ALREADY_DEFINED
-#else
-#define yyset_extra gram_set_extra
-#endif
-
-#ifdef yyget_in
-#define gram_get_in_ALREADY_DEFINED
-#else
-#define yyget_in gram_get_in
-#endif
-
-#ifdef yyset_in
-#define gram_set_in_ALREADY_DEFINED
-#else
-#define yyset_in gram_set_in
-#endif
-
-#ifdef yyget_out
-#define gram_get_out_ALREADY_DEFINED
-#else
-#define yyget_out gram_get_out
-#endif
-
-#ifdef yyset_out
-#define gram_set_out_ALREADY_DEFINED
-#else
-#define yyset_out gram_set_out
-#endif
-
-#ifdef yyget_leng
-#define gram_get_leng_ALREADY_DEFINED
-#else
-#define yyget_leng gram_get_leng
-#endif
-
-#ifdef yyget_text
-#define gram_get_text_ALREADY_DEFINED
-#else
-#define yyget_text gram_get_text
-#endif
-
-#ifdef yyget_lineno
-#define gram_get_lineno_ALREADY_DEFINED
-#else
-#define yyget_lineno gram_get_lineno
-#endif
-
-#ifdef yyset_lineno
-#define gram_set_lineno_ALREADY_DEFINED
-#else
-#define yyset_lineno gram_set_lineno
-#endif
-
-#ifdef yywrap
-#define gram_wrap_ALREADY_DEFINED
-#else
-#define yywrap gram_wrap
-#endif
-
+    
 /* %endif */
 
-#ifdef yyalloc
-#define gram_alloc_ALREADY_DEFINED
-#else
-#define yyalloc gram_alloc
-#endif
-
-#ifdef yyrealloc
-#define gram_realloc_ALREADY_DEFINED
-#else
-#define yyrealloc gram_realloc
-#endif
-
-#ifdef yyfree
-#define gram_free_ALREADY_DEFINED
-#else
-#define yyfree gram_free
-#endif
-
 /* %if-c-only */
 
-#ifdef yytext
-#define gram_text_ALREADY_DEFINED
-#else
-#define yytext gram_text
-#endif
-
-#ifdef yyleng
-#define gram_leng_ALREADY_DEFINED
-#else
-#define yyleng gram_leng
-#endif
-
-#ifdef yyin
-#define gram_in_ALREADY_DEFINED
-#else
-#define yyin gram_in
-#endif
-
-#ifdef yyout
-#define gram_out_ALREADY_DEFINED
-#else
-#define yyout gram_out
-#endif
-
-#ifdef yy_flex_debug
-#define gram__flex_debug_ALREADY_DEFINED
-#else
-#define yy_flex_debug gram__flex_debug
-#endif
-
-#ifdef yylineno
-#define gram_lineno_ALREADY_DEFINED
-#else
-#define yylineno gram_lineno
-#endif
-
 /* %endif */
 
 /* First, we deal with  platform-specific or compiler-specific issues. */
 /* %endif */
 /* end standard C headers. */
 
+char piece_temp[100];
+char *piece[10000];
+int piece0;
+int piece1;
+void insert_piece(int n, const char *str) {
+ memmove(piece + n + 1, piece + n, (piece1 - n) * sizeof(char *));
+ piece[n] = strdup(str);
+ ++piece0;
+ ++piece1;
+}
+
 /* %if-c-or-c++ */
 /* flex integer type definitions */
 
@@ -365,39 +138,50 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
-#ifndef SIZE_MAX
-#define SIZE_MAX               (~(size_t)0)
-#endif
-
 #endif /* ! C99 */
 
 #endif /* ! FLEXINT_H */
 
 /* %endif */
 
-/* begin standard C++ headers. */
 /* %if-c++-only */
 /* %endif */
 
-/* TODO: this is always defined, so inline it */
-#define yyconst const
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else  /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
 
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define yynoreturn __attribute__((__noreturn__))
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
 #else
-#define yynoreturn
+#define yyconst
 #endif
 
 /* %not-for-header */
+
 /* Returned upon end-of-file. */
 #define YY_NULL 0
 /* %ok-for-header */
 
 /* %not-for-header */
-/* Promotes a possibly negative, possibly signed char to an
- *   integer in range [0..255] for use as an array index.
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
  */
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
 /* %ok-for-header */
 
 /* %if-reentrant */
@@ -412,16 +196,20 @@ typedef unsigned int flex_uint32_t;
  * definition of BEGIN.
  */
 #define BEGIN (yy_start) = 1 + 2 *
+
 /* Translate the current start state into a value that can be later handed
  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  * compatibility.
  */
 #define YY_START (((yy_start) - 1) / 2)
 #define YYSTATE YY_START
+
 /* Action number for EOF rule of a given start state. */
 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
 /* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin  )
+#define YY_NEW_FILE gram_restart(gram_in  )
+
 #define YY_END_OF_BUFFER_CHAR 0
 
 /* Size of default input buffer. */
@@ -446,42 +234,56 @@ typedef unsigned int flex_uint32_t;
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
 /* %if-not-reentrant */
-extern int yyleng;
+extern int gram_leng;
 /* %endif */
 
 /* %if-c-only */
 /* %if-not-reentrant */
-extern FILE *yyin, *yyout;
+extern FILE *gram_in, *gram_out;
 /* %endif */
 /* %endif */
 
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
-    
+
     #define YY_LESS_LINENO(n)
-    #define YY_LINENO_REWIND_TO(ptr)
     
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
        do \
                { \
-               /* Undo effects of setting up yytext. */ \
+               /* Undo effects of setting up gram_text. */ \
         int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
                *yy_cp = (yy_hold_char); \
                YY_RESTORE_YY_MORE_OFFSET \
                (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-               YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+               YY_DO_BEFORE_ACTION; /* set up gram_text again */ \
                } \
        while ( 0 )
+
+#if 1
+#define flush() \
+ do { \
+  piece_esc(yytext, yy_c_buf_p - yytext); \
+  yytext = yy_c_buf_p; \
+ } while (0)
+#define unput(c) \
+ do { \
+  piece_esc(yytext, yy_c_buf_p - yytext); \
+  yyunput(c, (yytext_ptr)); \
+  yytext = yy_c_buf_p; \
+ } while (0)
+#else
 #define unput(c) yyunput( c, (yytext_ptr)  )
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
 
 #ifndef YY_STRUCT_YY_BUFFER_STATE
 #define YY_STRUCT_YY_BUFFER_STATE
@@ -500,7 +302,7 @@ struct yy_buffer_state
        /* Size of input buffer in bytes, not including room for EOB
         * characters.
         */
-       int yy_buf_size;
+       yy_size_t yy_buf_size;
 
        /* Number of characters read into yy_ch_buf, not including EOB
         * characters.
@@ -528,7 +330,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-
+    
        /* Whether to try to fill the input buffer when we reach the
         * end of it.
         */
@@ -545,8 +347,8 @@ struct yy_buffer_state
         * possible backing-up.
         *
         * When we actually see the EOF, we change the status to "new"
-        * (via yyrestart()), so that the user can continue scanning by
-        * just pointing yyin at a new input file.
+        * (via gram_restart()), so that the user can continue scanning by
+        * just pointing gram_in at a new input file.
         */
 #define YY_BUFFER_EOF_PENDING 2
 
@@ -555,12 +357,13 @@ struct yy_buffer_state
 
 /* %if-c-only Standard (non-C++) definition */
 /* %not-for-header */
+
 /* %if-not-reentrant */
 
 /* Stack of input buffers. */
 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
 /* %endif */
 /* %ok-for-header */
 
@@ -575,6 +378,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                           : NULL)
+
 /* Same as previous macro, but useful when we know that the buffer stack is not
  * NULL or when we need an lvalue. For internal use only.
  */
@@ -584,112 +388,115 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
 
 /* %if-not-reentrant */
 /* %not-for-header */
-/* yy_hold_char holds the character lost when yytext is formed. */
+
+/* yy_hold_char holds the character lost when gram_text is formed. */
 static char yy_hold_char;
 static int yy_n_chars;         /* number of characters read into yy_ch_buf */
-int yyleng;
+int gram_leng;
 
 /* Points to current character in buffer. */
-static char *yy_c_buf_p = NULL;
+static char *yy_c_buf_p = (char *) 0;
 static int yy_init = 0;                /* whether we need to initialize */
 static int yy_start = 0;       /* start state number */
 
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
+/* Flag which is used to allow gram_wrap()'s to do buffer switches
+ * instead of setting up a fresh gram_in.  A bit of a hack ...
  */
 static int yy_did_buffer_switch_on_eof;
 /* %ok-for-header */
 
 /* %endif */
 
-void yyrestart ( FILE *input_file  );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
-void yy_delete_buffer ( YY_BUFFER_STATE b  );
-void yy_flush_buffer ( YY_BUFFER_STATE b  );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
-void yypop_buffer_state ( void );
+void gram_restart (FILE *input_file  );
+void gram__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE gram__create_buffer (FILE *file,int size  );
+void gram__delete_buffer (YY_BUFFER_STATE b  );
+void gram__flush_buffer (YY_BUFFER_STATE b  );
+void gram_push_buffer_state (YY_BUFFER_STATE new_buffer  );
+void gram_pop_buffer_state (void );
+
+static void gram_ensure_buffer_stack (void );
+static void gram__load_buffer_state (void );
+static void gram__init_buffer (YY_BUFFER_STATE b,FILE *file  );
 
-static void yyensure_buffer_stack ( void );
-static void yy_load_buffer_state ( void );
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+#define YY_FLUSH_BUFFER gram__flush_buffer(YY_CURRENT_BUFFER )
 
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );
+YY_BUFFER_STATE gram__scan_buffer (char *base,yy_size_t size  );
+YY_BUFFER_STATE gram__scan_string (yyconst char *yy_str  );
+YY_BUFFER_STATE gram__scan_bytes (yyconst char *bytes,int len  );
 
 /* %endif */
 
-void *yyalloc ( yy_size_t  );
-void *yyrealloc ( void *, yy_size_t  );
-void yyfree ( void *  );
+void *gram_alloc (yy_size_t  );
+void *gram_realloc (void *,yy_size_t  );
+void gram_free (void *  );
+
+#define yy_new_buffer gram__create_buffer
 
-#define yy_new_buffer yy_create_buffer
 #define yy_set_interactive(is_interactive) \
        { \
        if ( ! YY_CURRENT_BUFFER ){ \
-        yyensure_buffer_stack (); \
+        gram_ensure_buffer_stack (); \
                YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer( yyin, YY_BUF_SIZE ); \
+            gram__create_buffer(gram_in,YY_BUF_SIZE ); \
        } \
        YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
        }
+
 #define yy_set_bol(at_bol) \
        { \
        if ( ! YY_CURRENT_BUFFER ){\
-        yyensure_buffer_stack (); \
+        gram_ensure_buffer_stack (); \
                YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer( yyin, YY_BUF_SIZE ); \
+            gram__create_buffer(gram_in,YY_BUF_SIZE ); \
        } \
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
        }
+
 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
-/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
+/* %% [1.0] gram_text/gram_in/gram_out/yy_state_type/gram_lineno etc. def's & init go here */
 /* Begin user sect3 */
 
-#define gram_wrap() (/*CONSTCOND*/1)
+#define gram_wrap(n) 1
 #define YY_SKIP_YYWRAP
 
 #define FLEX_DEBUG
-typedef flex_uint8_t YY_CHAR;
 
-FILE *yyin = NULL, *yyout = NULL;
+typedef unsigned char YY_CHAR;
+
+FILE *gram_in = (FILE *) 0, *gram_out = (FILE *) 0;
 
 typedef int yy_state_type;
 
-extern int yylineno;
-int yylineno = 1;
+extern int gram_lineno;
 
-extern char *yytext;
-#ifdef yytext_ptr
-#undef yytext_ptr
-#endif
-#define yytext_ptr yytext
+int gram_lineno = 1;
 
-/* %% [1.5] DFA */
+extern char *gram_text;
+#define yytext_ptr gram_text
 
 /* %if-c-only Standard (non-C++) definition */
 
-static yy_state_type yy_get_previous_state ( void );
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
-static int yy_get_next_buffer ( void );
-static void yynoreturn yy_fatal_error ( const char* msg  );
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[]  );
 
 /* %endif */
 
 /* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
+ * corresponding action - sets up gram_text.
  */
 #define YY_DO_BEFORE_ACTION \
        (yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
-       yyleng = (int) (yy_cp - yy_bp); \
+/* %% [2.0] code to fiddle gram_text and gram_leng for yymore() goes here \ */\
+       gram_leng = (size_t) (yy_cp - yy_bp); \
        (yy_hold_char) = *yy_cp; \
        *yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
+/* %% [3.0] code to copy yytext_ptr to gram_text[] goes here, if %array \ */\
        (yy_c_buf_p) = yy_cp;
+
 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
 #define YY_NUM_RULES 130
 #define YY_END_OF_BUFFER 131
@@ -700,7 +507,7 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static const flex_int16_t yy_accept[579] =
+static yyconst flex_int16_t yy_accept[579] =
     {   0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
@@ -767,7 +574,7 @@ static const flex_int16_t yy_accept[579] =
        55,   62,   62,   62,   62,   62,   31,    0
     } ;
 
-static const YY_CHAR yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         2,    2,    4,    1,    1,    1,    1,    1,    1,    1,
@@ -799,7 +606,7 @@ static const YY_CHAR yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static const YY_CHAR yy_meta[59] =
+static yyconst flex_int32_t yy_meta[59] =
     {   0,
         1,    2,    3,    1,    2,    4,    1,    4,    4,    4,
         4,    5,    6,    2,    7,    7,    7,    1,    4,    8,
@@ -809,7 +616,7 @@ static const YY_CHAR yy_meta[59] =
         9,    9,    9,    9,    4,    4,    4,    1
     } ;
 
-static const flex_int16_t yy_base[605] =
+static yyconst flex_int16_t yy_base[605] =
     {   0,
         0, 1001,  997,  996,   56,   57,   58,   61,   63,   90,
        76,   87,   70,   97,  117,  121,   66,  130,  140,  144,
@@ -880,7 +687,7 @@ static const flex_int16_t yy_base[605] =
       135,  133,   87,  738
     } ;
 
-static const flex_int16_t yy_def[605] =
+static yyconst flex_int16_t yy_def[605] =
     {   0,
       578,    1,  579,  579,  580,  580,  580,  580,  581,  581,
       582,  582,  580,  580,  580,  580,  580,  580,  580,  580,
@@ -951,7 +758,7 @@ static const flex_int16_t yy_def[605] =
       578,  578,  578,  578
     } ;
 
-static const flex_int16_t yy_nxt[1068] =
+static yyconst flex_int16_t yy_nxt[1068] =
     {   0,
        34,   35,   36,   34,   35,   37,   34,   38,   39,   40,
        41,   34,   42,   43,   44,   45,   45,   34,   46,   47,
@@ -1072,7 +879,7 @@ static const flex_int16_t yy_nxt[1068] =
       578,  578,  578,  578,  578,  578,  578
     } ;
 
-static const flex_int16_t yy_chk[1068] =
+static yyconst flex_int16_t yy_chk[1068] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -1196,25 +1003,25 @@ static const flex_int16_t yy_chk[1068] =
 static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
 
-extern int yy_flex_debug;
-int yy_flex_debug = 1;
+extern int gram__flex_debug;
+int gram__flex_debug = 1;
 
-static const flex_int16_t yy_rule_linenum[130] =
+static yyconst flex_int16_t yy_rule_linenum[130] =
     {   0,
-      186,  189,  190,  191,  199,  217,  218,  219,  220,  221,
-      222,  223,  224,  225,  226,  227,  228,  229,  230,  231,
-      232,  233,  234,  235,  236,  237,  238,  239,  240,  241,
-      242,  243,  244,  245,  246,  247,  248,  249,  250,  251,
-      252,  253,  254,  255,  256,  257,  258,  259,  260,  261,
-      264,  265,  266,  267,  268,  269,  270,  271,  272,  273,
-      274,  276,  280,  281,  282,  284,  291,  295,  302,  307,
-      310,  313,  316,  324,  331,  332,  333,  339,  346,  353,
-      373,  383,  398,  403,  422,  435,  451,  466,  483,  484,
-      495,  506,  507,  519,  527,  537,  556,  568,  582,  583,
-
-      594,  603,  613,  614,  615,  616,  617,  618,  619,  622,
-      624,  632,  650,  655,  656,  662,  663,  674,  680,  686,
-      692,  708,  709,  713,  720,  737,  758,  791,  792
+      188,  191,  192,  193,  201,  219,  220,  221,  222,  223,
+      224,  225,  226,  227,  228,  229,  230,  231,  232,  233,
+      234,  235,  236,  237,  238,  239,  240,  241,  242,  243,
+      244,  245,  246,  247,  248,  249,  250,  251,  252,  253,
+      254,  255,  256,  257,  258,  259,  260,  261,  262,  263,
+      266,  267,  268,  269,  270,  271,  272,  273,  274,  275,
+      276,  278,  282,  283,  284,  286,  298,  312,  329,  334,
+      337,  340,  343,  353,  362,  363,  364,  372,  379,  386,
+      406,  416,  431,  443,  474,  487,  503,  518,  535,  536,
+      547,  558,  559,  571,  580,  590,  610,  622,  637,  638,
+
+      649,  664,  680,  681,  682,  683,  684,  685,  686,  689,
+      691,  705,  723,  728,  729,  735,  736,  747,  755,  763,
+      769,  785,  786,  790,  797,  815,  837,  871,  872
     } ;
 
 /* The intent behind this definition is that it'll catch
@@ -1224,8 +1031,8 @@ static const flex_int16_t yy_rule_linenum[130] =
 #define yymore() yymore_used_but_not_detected
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+char *gram_text;
+#line 1 "src/scan-gram.l"
 /* Bison Grammar Scanner                             -*- C -*-
 
    Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
@@ -1245,7 +1052,7 @@ char *yytext;
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define YY_NO_INPUT 1
-#line 24 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 24 "src/scan-gram.l"
 /* Work around a bug in flex 2.5.31.  See Debian bug 333231
    <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>.  */
 #undef gram_wrap
@@ -1273,10 +1080,10 @@ char *yytext;
 /* Location of scanner cursor.  */
 static boundary scanner_cursor;
 
-#define YY_USER_ACTION  location_compute (loc, &scanner_cursor, yytext, yyleng);
+#define YY_USER_ACTION  location_compute (loc, &scanner_cursor, gram_text, gram_leng);
 
 static size_t no_cr_read (FILE *, char *, size_t);
-#define YY_INPUT(buf, result, size) ((result) = no_cr_read (yyin, buf, size))
+#define YY_INPUT(buf, result, size) ((result) = no_cr_read (gram_in, buf, size))
 
 #define RETURN_PERCENT_PARAM(Value)                     \
   RETURN_VALUE(PERCENT_PARAM, param, param_ ## Value)
@@ -1292,14 +1099,14 @@ static size_t no_cr_read (FILE *, char *, size_t);
 
 #define ROLLBACK_CURRENT_TOKEN                                  \
   do {                                                          \
-    scanner_cursor.column -= mbsnwidth (yytext, yyleng, 0);     \
+    scanner_cursor.column -= mbsnwidth (gram_text, gram_leng, 0);     \
     yyless (0);                                                 \
   } while (0)
 
 #define DEPRECATED(Msg)                                         \
   do {                                                          \
     size_t i;                                                   \
-    deprecated_directive (loc, yytext, Msg);                    \
+    deprecated_directive (loc, gram_text, Msg);                    \
     scanner_cursor.column -= mbsnwidth (Msg, strlen (Msg), 0);  \
     for (i = strlen (Msg); i != 0; --i)                         \
       unput (Msg[i - 1]);                                       \
@@ -1326,38 +1133,36 @@ static int convert_ucn_to_byte (char const *hex_text);
 static void unexpected_eof (boundary, char const *);
 static void unexpected_newline (boundary, char const *);
 
-#line 1329 "src/scan-gram.c"
-#line 106 "/Users/akim/src/gnu/bison/src/scan-gram.l"
- /* A C-like comment in directives/rules. */
+/* A C-like comment in directives/rules. */
 
- /* Strings and characters in directives/rules. */
+/* Strings and characters in directives/rules. */
 
- /* A identifier was just read in directives/rules.  Special state
-    to capture the sequence 'identifier :'. */
+/* A identifier was just read in directives/rules.  Special state
+to capture the sequence 'identifier :'. */
 
- /* POSIX says that a tag must be both an id and a C union member, but
-    historically almost any character is allowed in a tag.  We
-    disallow NUL, as this simplifies our implementation.  We match
-    angle brackets in nested pairs: several languages use them for
-    generics/template types.  */
+/* POSIX says that a tag must be both an id and a C union member, but
+historically almost any character is allowed in a tag.  We
+disallow NUL, as this simplifies our implementation.  We match
+angle brackets in nested pairs: several languages use them for
+generics/template types.  */
 
- /* Four types of user code:
-    - prologue (code between '%{' '%}' in the first section, before %%);
-    - actions, printers, union, etc, (between braced in the middle section);
-    - epilogue (everything after the second %%).
-    - predicate (code between '%?{' and '{' in middle section); */
+/* Four types of user code:
+- prologue (code between '%{' '%}' in the first section, before %%);
+- actions, printers, union, etc, (between braced in the middle section);
+- epilogue (everything after the second %%).
+- predicate (code between '%?{' and '{' in middle section); */
 
- /* C and C++ comments in code. */
+/* C and C++ comments in code. */
 
- /* Strings and characters in code. */
+/* Strings and characters in code. */
 
- /* Bracketed identifiers support. */
+/* Bracketed identifiers support. */
 
 /* Zero or more instances of backslash-newline.  Following GCC, allow
    white space between the backslash and the newline.  */
 /* An equal sign, with optional leading whitespaces. This is used in some
    deprecated constructs. */
-#line 1360 "src/scan-gram.c"
+#line 1141 "src/scan-gram.c"
 
 #define INITIAL 0
 #define SC_YACC_COMMENT 1
@@ -1396,7 +1201,7 @@ static void unexpected_newline (boundary, char const *);
 /* %if-reentrant */
 /* %if-c-only */
 
-static int yy_init_globals ( void );
+static int yy_init_globals (void );
 
 /* %endif */
 /* %if-reentrant */
@@ -1406,31 +1211,31 @@ static int yy_init_globals ( void );
 /* Accessor methods to globals.
    These are made visible to non-reentrant scanners for convenience. */
 
-int yylex_destroy ( void );
+int gram_lex_destroy (void );
 
-int yyget_debug ( void );
+int gram_get_debug (void );
 
-void yyset_debug ( int debug_flag  );
+void gram_set_debug (int debug_flag  );
 
-YY_EXTRA_TYPE yyget_extra ( void );
+YY_EXTRA_TYPE gram_get_extra (void );
 
-void yyset_extra ( YY_EXTRA_TYPE user_defined  );
+void gram_set_extra (YY_EXTRA_TYPE user_defined  );
 
-FILE *yyget_in ( void );
+FILE *gram_get_in (void );
 
-void yyset_in  ( FILE * _in_str  );
+void gram_set_in  (FILE * in_str  );
 
-FILE *yyget_out ( void );
+FILE *gram_get_out (void );
 
-void yyset_out  ( FILE * _out_str  );
+void gram_set_out  (FILE * out_str  );
 
-                       int yyget_leng ( void );
+int gram_get_leng (void );
 
-char *yyget_text ( void );
+char *gram_get_text (void );
 
-int yyget_lineno ( void );
+int gram_get_lineno (void );
 
-void yyset_lineno ( int _line_number  );
+void gram_set_lineno (int line_number  );
 
 /* %if-bison-bridge */
 /* %endif */
@@ -1441,37 +1246,36 @@ void yyset_lineno ( int _line_number  );
 
 #ifndef YY_SKIP_YYWRAP
 #ifdef __cplusplus
-extern "C" int yywrap ( void );
+extern "C" int gram_wrap (void );
 #else
-extern int yywrap ( void );
+extern int gram_wrap (void );
 #endif
 #endif
 
 /* %not-for-header */
-#ifndef YY_NO_UNPUT
-    
-    static void yyunput ( int c, char *buf_ptr  );
+
+    static void yyunput (int c,char *buf_ptr  );
     
-#endif
 /* %ok-for-header */
 
 /* %endif */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int );
+static void yy_flex_strncpy (char *,yyconst char *,int );
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * );
+static int yy_flex_strlen (yyconst char * );
 #endif
 
 #ifndef YY_NO_INPUT
 /* %if-c-only Standard (non-C++) definition */
 /* %not-for-header */
+
 #ifdef __cplusplus
-static int yyinput ( void );
+static int yyinput (void );
 #else
-static int input ( void );
+static int input (void );
 #endif
 /* %ok-for-header */
 
@@ -1498,7 +1302,7 @@ static int input ( void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( gram_text, gram_leng, 1, gram_out )) {} } while (0)
 /* %endif */
 /* %if-c++-only C++ definition */
 /* %endif */
@@ -1513,20 +1317,20 @@ static int input ( void );
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               int n; \
+               size_t n; \
                for ( n = 0; n < max_size && \
-                            (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+                            (c = getc( gram_in )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
                if ( c == '\n' ) \
                        buf[n++] = (char) c; \
-               if ( c == EOF && ferror( yyin ) ) \
+               if ( c == EOF && ferror( gram_in ) ) \
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
                result = n; \
                } \
        else \
                { \
                errno=0; \
-               while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+               while ( (result = fread(buf, 1, max_size, gram_in))==0 && ferror(gram_in)) \
                        { \
                        if( errno != EINTR) \
                                { \
@@ -1534,7 +1338,7 @@ static int input ( void );
                                break; \
                                } \
                        errno=0; \
-                       clearerr(yyin); \
+                       clearerr(gram_in); \
                        } \
                }\
 \
@@ -1567,9 +1371,11 @@ static int input ( void );
 
 /* %if-tables-serialization structures and prototypes */
 /* %not-for-header */
+
 /* %ok-for-header */
 
 /* %not-for-header */
+
 /* %tables-yydmap generated elements */
 /* %endif */
 /* end tables serialization structures and prototypes */
@@ -1583,15 +1389,15 @@ static int input ( void );
 #define YY_DECL_IS_OURS 1
 /* %if-c-only Standard (non-C++) definition */
 
-extern int yylex (void);
+extern int gram_lex (void);
 
-#define YY_DECL int yylex (void)
+#define YY_DECL int gram_lex (void)
 /* %endif */
 /* %if-c++-only C++ definition */
 /* %endif */
 #endif /* !YY_DECL */
 
-/* Code executed at the beginning of each rule, after yytext and yyleng
+/* Code executed at the beginning of each rule, after gram_text and gram_leng
  * have been set up.
  */
 #ifndef YY_USER_ACTION
@@ -1600,62 +1406,110 @@ extern int yylex (void);
 
 /* Code executed at the end of each rule. */
 #ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
+#define YY_BREAK break;
 #endif
 
 /* %% [6.0] YY_RULE_SETUP definition goes here */
 #define YY_RULE_SETUP \
-       if ( yyleng > 0 ) \
+       if ( gram_leng > 0 ) \
                YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
-                               (yytext[yyleng - 1] == '\n'); \
+                               (gram_text[gram_leng - 1] == '\n'); \
        YY_USER_ACTION
 
 /* %not-for-header */
+
 /** The main scanner function which does all the work.
  */
+static int real_yylex(GRAM_STYPE *val, location *loc);
+static void piece_esc(const char *p, size_t n) {
+ size_t i, j = 0;
+ for (i = 0; i < n; ++i)
+  switch (p[i]) {
+  case '<':
+  case '>':
+   j += 4;
+   break;
+  case '&':
+   j += 5;
+   break;
+  default:
+   ++j;
+   break;
+  }
+ char *q = malloc(j + 1);
+ j = 0;
+ for (i = 0; i < n; ++i)
+  switch (p[i]) {
+  case '<':
+   memcpy(q + j, "&lt;", 4);
+   j += 4;
+   break;
+  case '>':
+   memcpy(q + j, "&gt;", 4);
+   j += 4;
+   break;
+  case '&':
+   memcpy(q + j, "&amp;", 5);
+   j += 5;
+   break;
+  default:
+   q[j++] = p[i];
+   break;
+  }
+ q[j] = 0;
+ piece[piece1++] = q;
+}
+static void piece_pack() {
+ int i;
+ size_t j = 0;
+ for (i = piece0; i < piece1; ++i)
+  j += strlen(piece[i]);
+ char *q = malloc(j + 1);
+ j = 0;
+ for (i = piece0; i < piece1; ++i) {
+  int k = strlen(piece[i]);
+  memcpy(q + j, piece[i], k);
+  free(piece[i]);
+  j += k;
+ }
+ q[j] = 0;
+ piece[piece0++] = q;
+ piece1 = piece0;
+}
 YY_DECL
 {
-       yy_state_type yy_current_state;
-       char *yy_cp, *yy_bp;
-       int yy_act;
-    
-       if ( !(yy_init) )
-               {
-               (yy_init) = 1;
-
-#ifdef YY_USER_INIT
-               YY_USER_INIT;
+ int result = real_yylex(val, loc);
+ if (result < 0)
+  return ~result;
+ piece_pack();
+#if 0
+ piece[piece1++] = strdup(piece_temp);
+ ++piece0;
+#else
+ size_t n = strlen(yytext);
+ if (n) {
+  sprintf(piece_temp, "<token value=\"%d\">", result);
+  piece[piece1++] = strdup(piece_temp);
+  piece_esc(yytext, n);
+  piece[piece1++] = strdup("</token>");
+  piece_pack();
+ }
+ else {
+  sprintf(piece_temp, "<token value=\"%d\" />", result);
+  piece[piece1++] = strdup(piece_temp);
+  ++piece0;
+ }
 #endif
-
-               if ( ! (yy_start) )
-                       (yy_start) = 1; /* first start state */
-
-               if ( ! yyin )
-/* %if-c-only */
-                       yyin = stdin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
-               if ( ! yyout )
-/* %if-c-only */
-                       yyout = stdout;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
-               if ( ! YY_CURRENT_BUFFER ) {
-                       yyensure_buffer_stack ();
-                       YY_CURRENT_BUFFER_LVALUE =
-                               yy_create_buffer( yyin, YY_BUF_SIZE );
-               }
-
-               yy_load_buffer_state(  );
-               }
-
-       {
+ return result;
+}
+static int real_yylex(GRAM_STYPE *val, location *loc)
+{
+       register yy_state_type yy_current_state;
+       register char *yy_cp, *yy_bp;
+       register int yy_act;
+    
 /* %% [7.0] user's declarations go here */
-#line 147 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 146 "src/scan-gram.l"
 
 
   /* Nesting level.  Either for nested braces, or nested angle brackets
@@ -1669,7 +1523,7 @@ YY_DECL
   location id_loc PACIFY_CC (= empty_location);
 
   /* Where containing code started, when applicable.  Its initial
-     value is relevant only when yylex is invoked in the SC_EPILOGUE
+     value is relevant only when gram_lex is invoked in the SC_EPILOGUE
      start condition.  */
   boundary code_start = scanner_cursor;
 
@@ -1686,20 +1540,62 @@ YY_DECL
       first = false;
     }
 
+  /* Nick */
+  int piece0_save; /* because of lookahead for : after identifer */
+
 
 
   /*-----------------------.
   | Scanning white space.  |
   `-----------------------*/
 
-#line 1695 "src/scan-gram.c"
+#line 1446 "src/scan-gram.c"
 
-       while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
+       if ( !(yy_init) )
+               {
+               (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+               YY_USER_INIT;
+#endif
+
+               if ( ! (yy_start) )
+                       (yy_start) = 1; /* first start state */
+
+               if ( ! gram_in )
+/* %if-c-only */
+                       gram_in = stdin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+               if ( ! gram_out )
+/* %if-c-only */
+                       gram_out = stdout;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+               if ( ! YY_CURRENT_BUFFER ) {
+                       gram_ensure_buffer_stack ();
+                       YY_CURRENT_BUFFER_LVALUE =
+                               gram__create_buffer(gram_in,YY_BUF_SIZE );
+               }
+
+               gram__load_buffer_state( );
+               }
+
+#if 1
+ /* we do this so that "continue;" in an action works correctly */
+ for (; ; piece_esc(yytext, yy_c_buf_p - yytext))
+#else
+       while ( 1 )             /* loops until end-of-file is reached */
+#endif
                {
 /* %% [8.0] yymore()-related code goes here */
                yy_cp = (yy_c_buf_p);
 
-               /* Support of yytext. */
+               /* Support of gram_text. */
                *yy_cp = (yy_hold_char);
 
                /* yy_bp points to the position in yy_ch_buf of the start of
@@ -1713,7 +1609,7 @@ YY_DECL
 yy_match:
                do
                        {
-                       YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+                       register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
                        if ( yy_accept[yy_current_state] )
                                {
                                (yy_last_accepting_state) = yy_current_state;
@@ -1723,9 +1619,9 @@ yy_match:
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
                                if ( yy_current_state >= 579 )
-                                       yy_c = yy_meta[yy_c];
+                                       yy_c = yy_meta[(unsigned int) yy_c];
                                }
-                       yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+                       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
                while ( yy_current_state != 578 );
@@ -1738,21 +1634,21 @@ yy_find_action:
 
                YY_DO_BEFORE_ACTION;
 
-/* %% [11.0] code for yylineno update goes here */
+/* %% [11.0] code for gram_lineno update goes here */
 
 do_action:     /* This label is used only to access EOF actions. */
 
 /* %% [12.0] debug code goes here */
-               if ( yy_flex_debug )
+               if ( gram__flex_debug )
                        {
                        if ( yy_act == 0 )
                                fprintf( stderr, "--scanner backing up\n" );
                        else if ( yy_act < 130 )
                                fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
-                                        (long)yy_rule_linenum[yy_act], yytext );
+                                        (long)yy_rule_linenum[yy_act], gram_text );
                        else if ( yy_act == 130 )
                                fprintf( stderr, "--accepting default rule (\"%s\")\n",
-                                        yytext );
+                                        gram_text );
                        else if ( yy_act == 131 )
                                fprintf( stderr, "--(end of buffer or a NUL)\n" );
                        else
@@ -1772,23 +1668,23 @@ do_action:      /* This label is used only to access EOF actions. */
 /* Comments and white space.  */
 case 1:
 YY_RULE_SETUP
-#line 186 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 188 "src/scan-gram.l"
 {
      complain (loc, Wother, _("stray ',' treated as white space"));
   }
        YY_BREAK
 case 2:
 /* rule 2 can match eol */
-#line 190 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 192 "src/scan-gram.l"
 case 3:
 /* rule 3 can match eol */
 YY_RULE_SETUP
-#line 190 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 192 "src/scan-gram.l"
 continue;
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 191 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 193 "src/scan-gram.l"
 {
     token_start = loc->start;
     context_state = YY_START;
@@ -1800,9 +1696,9 @@ YY_RULE_SETUP
 case 5:
 /* rule 5 can match eol */
 YY_RULE_SETUP
-#line 199 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 201 "src/scan-gram.l"
 {
-    handle_syncline (yytext + sizeof "#line " - 1, *loc);
+    handle_syncline (gram_text + sizeof "#line " - 1, *loc);
   }
        YY_BREAK
 
@@ -1818,408 +1714,439 @@ YY_RULE_SETUP
 
 case 6:
 YY_RULE_SETUP
-#line 217 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 219 "src/scan-gram.l"
 return PERCENT_NONASSOC;
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 218 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 220 "src/scan-gram.l"
 return PERCENT_CODE;
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 219 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 221 "src/scan-gram.l"
 RETURN_PERCENT_FLAG("parse.trace");
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 220 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 222 "src/scan-gram.l"
 return PERCENT_DEFAULT_PREC;
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 221 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 223 "src/scan-gram.l"
 return PERCENT_DEFINE;
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 222 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 224 "src/scan-gram.l"
 return PERCENT_DEFINES;
        YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 223 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 225 "src/scan-gram.l"
 return PERCENT_DESTRUCTOR;
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 224 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 226 "src/scan-gram.l"
 return PERCENT_DPREC;
        YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 225 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 227 "src/scan-gram.l"
 return PERCENT_EMPTY;
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 226 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 228 "src/scan-gram.l"
 return PERCENT_ERROR_VERBOSE;
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 227 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 229 "src/scan-gram.l"
 return PERCENT_EXPECT;
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 228 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 230 "src/scan-gram.l"
 return PERCENT_EXPECT_RR;
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 229 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 231 "src/scan-gram.l"
 return PERCENT_FILE_PREFIX;
        YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 230 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 232 "src/scan-gram.l"
 return PERCENT_YACC;
        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 231 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 233 "src/scan-gram.l"
 return PERCENT_INITIAL_ACTION;
        YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 232 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 234 "src/scan-gram.l"
 return PERCENT_GLR_PARSER;
        YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 233 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 235 "src/scan-gram.l"
 return PERCENT_LANGUAGE;
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 234 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 236 "src/scan-gram.l"
 return PERCENT_LEFT;
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 235 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 237 "src/scan-gram.l"
 RETURN_PERCENT_PARAM(lex);
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 236 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 238 "src/scan-gram.l"
 RETURN_PERCENT_FLAG("locations");
        YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 237 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 239 "src/scan-gram.l"
 return PERCENT_MERGE;
        YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 238 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 240 "src/scan-gram.l"
 return PERCENT_NAME_PREFIX;
        YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 239 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 241 "src/scan-gram.l"
 return PERCENT_NO_DEFAULT_PREC;
        YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 240 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 242 "src/scan-gram.l"
 return PERCENT_NO_LINES;
        YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 241 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 243 "src/scan-gram.l"
 return PERCENT_NONASSOC;
        YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 242 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 244 "src/scan-gram.l"
 return PERCENT_NONDETERMINISTIC_PARSER;
        YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 243 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 245 "src/scan-gram.l"
 return PERCENT_NTERM;
        YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 244 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 246 "src/scan-gram.l"
 return PERCENT_OUTPUT;
        YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 245 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 247 "src/scan-gram.l"
 RETURN_PERCENT_PARAM(both);
        YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 246 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 248 "src/scan-gram.l"
 RETURN_PERCENT_PARAM(parse);
        YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 247 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 249 "src/scan-gram.l"
 return PERCENT_PREC;
        YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 248 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 250 "src/scan-gram.l"
 return PERCENT_PRECEDENCE;
        YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 249 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 251 "src/scan-gram.l"
 return PERCENT_PRINTER;
        YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 250 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 252 "src/scan-gram.l"
 RETURN_PERCENT_FLAG("api.pure");
        YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 251 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 253 "src/scan-gram.l"
 return PERCENT_REQUIRE;
        YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 252 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 254 "src/scan-gram.l"
 return PERCENT_RIGHT;
        YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 253 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 255 "src/scan-gram.l"
 return PERCENT_SKELETON;
        YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 254 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 256 "src/scan-gram.l"
 return PERCENT_START;
        YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 255 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 257 "src/scan-gram.l"
 return PERCENT_TOKEN;
        YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 256 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 258 "src/scan-gram.l"
 return PERCENT_TOKEN;
        YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 257 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 259 "src/scan-gram.l"
 return PERCENT_TOKEN_TABLE;
        YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 258 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 260 "src/scan-gram.l"
 return PERCENT_TYPE;
        YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 259 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 261 "src/scan-gram.l"
 return PERCENT_UNION;
        YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 260 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 262 "src/scan-gram.l"
 return PERCENT_VERBOSE;
        YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 261 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 263 "src/scan-gram.l"
 return PERCENT_YACC;
        YY_BREAK
 /* deprecated */
 case 51:
 YY_RULE_SETUP
-#line 264 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 266 "src/scan-gram.l"
 DEPRECATED("%default-prec");
        YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 265 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 267 "src/scan-gram.l"
 DEPRECATED("%define parse.error verbose");
        YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 266 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 268 "src/scan-gram.l"
 DEPRECATED("%expect-rr");
        YY_BREAK
 case 54:
 /* rule 54 can match eol */
 YY_RULE_SETUP
-#line 267 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 269 "src/scan-gram.l"
 DEPRECATED("%file-prefix");
        YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 268 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 270 "src/scan-gram.l"
 DEPRECATED("%fixed-output-files");
        YY_BREAK
 case 56:
 /* rule 56 can match eol */
 YY_RULE_SETUP
-#line 269 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 271 "src/scan-gram.l"
 DEPRECATED("%name-prefix");
        YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 270 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 272 "src/scan-gram.l"
 DEPRECATED("%no-default-prec");
        YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 271 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 273 "src/scan-gram.l"
 DEPRECATED("%no-lines");
        YY_BREAK
 case 59:
 /* rule 59 can match eol */
 YY_RULE_SETUP
-#line 272 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 274 "src/scan-gram.l"
 DEPRECATED("%output");
        YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 273 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 275 "src/scan-gram.l"
 DEPRECATED("%pure-parser");
        YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 274 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 276 "src/scan-gram.l"
 DEPRECATED("%token-table");
        YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 276 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 278 "src/scan-gram.l"
 {
-    complain (loc, complaint, _("invalid directive: %s"), quote (yytext));
+    complain (loc, complaint, _("invalid directive: %s"), quote (gram_text));
   }
        YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 280 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 282 "src/scan-gram.l"
 return EQUAL;
        YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 281 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 283 "src/scan-gram.l"
 return PIPE;
        YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 282 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 284 "src/scan-gram.l"
 return SEMICOLON;
        YY_BREAK
 case 66:
 YY_RULE_SETUP
-#line 284 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 286 "src/scan-gram.l"
 {
-    val->uniqstr = uniqstr_new (yytext);
+    val->uniqstr = uniqstr_new (gram_text);
     id_loc = *loc;
     bracketed_id_str = NULL;
     BEGIN SC_AFTER_IDENTIFIER;
+ piece_pack();
+ piece0_save = piece0;
+ piece[piece1++] = strdup("<Id>");
+ flush();
+ piece[piece1++] = strdup("</Id>");
   }
        YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 291 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 298 "src/scan-gram.l"
 {
-    val->integer = scan_integer (yytext, 10, *loc);
+    val->integer = scan_integer (gram_text, 10, *loc);
+#if 1
+ piece_pack();
+ sprintf(piece_temp, "<Int value=\"%d\">", val->integer);
+ piece[piece1++] = strdup(piece_temp);
+ piece[piece1++] = strdup(gram_text);
+ piece[piece1++] = strdup("</Int>");
+ piece_pack();
+ return ~INT;
+#else
     return INT;
+#endif
   }
        YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 295 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 312 "src/scan-gram.l"
 {
-    val->integer = scan_integer (yytext, 16, *loc);
+    val->integer = scan_integer (gram_text, 16, *loc);
+#if 1
+ piece_pack();
+ sprintf(piece_temp, "<Int value=\"%d\">", val->integer);
+ piece[piece1++] = strdup(piece_temp);
+ piece[piece1++] = strdup(gram_text);
+ piece[piece1++] = strdup("</Integer>");
+ piece_pack();
+ return ~INT;
+#else
     return INT;
+#endif
   }
        YY_BREAK
 /* Identifiers may not start with a digit.  Yet, don't silently
      accept "1FOO" as "1 FOO".  */
 case 69:
 YY_RULE_SETUP
-#line 302 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 329 "src/scan-gram.l"
 {
-    complain (loc, complaint, _("invalid identifier: %s"), quote (yytext));
+    complain (loc, complaint, _("invalid identifier: %s"), quote (gram_text));
   }
        YY_BREAK
 /* Characters.  */
 case 70:
 YY_RULE_SETUP
-#line 307 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER;
+#line 334 "src/scan-gram.l"
+token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER; flush(); piece[piece1++] = strdup("<EscapedCharacter>");
        YY_BREAK
 /* Strings. */
 case 71:
 YY_RULE_SETUP
-#line 310 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-token_start = loc->start; BEGIN SC_ESCAPED_STRING;
+#line 337 "src/scan-gram.l"
+token_start = loc->start; BEGIN SC_ESCAPED_STRING; flush(); piece[piece1++] = strdup("<EscapedString>");
        YY_BREAK
 /* Prologue. */
 case 72:
 YY_RULE_SETUP
-#line 313 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-code_start = loc->start; BEGIN SC_PROLOGUE;
+#line 340 "src/scan-gram.l"
+code_start = loc->start; BEGIN SC_PROLOGUE; flush(); piece[piece1++] = strdup("<Prologue>");
        YY_BREAK
 /* Code in between braces.  */
 case 73:
 YY_RULE_SETUP
-#line 316 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 343 "src/scan-gram.l"
 {
     STRING_GROW;
     nesting = 0;
     code_start = loc->start;
     BEGIN SC_BRACED_CODE;
+ flush();
+ piece[piece1++] = strdup("<BracedCode>");
   }
        YY_BREAK
 /* Semantic predicate. */
 case 74:
 /* rule 74 can match eol */
 YY_RULE_SETUP
-#line 324 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 353 "src/scan-gram.l"
 {
     nesting = 0;
     code_start = loc->start;
+ flush();
+ piece[piece1++] = strdup("<Predicate>");
     BEGIN SC_PREDICATE;
   }
        YY_BREAK
 /* A type. */
 case 75:
 YY_RULE_SETUP
-#line 331 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-return TAG_ANY;
+#line 362 "src/scan-gram.l"
+piece_pack(); piece[piece1++] = strdup("&lt;<TagAny>*</TagAny>&gt;"); ++piece0; return ~TAG_ANY; /*return TAG_ANY;*/
        YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 332 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-return TAG_NONE;
+#line 363 "src/scan-gram.l"
+piece_pack(); piece[piece1++] = strdup("&lt;<TagNone />&gt;"); ++piece0; return ~TAG_NONE; /*return TAG_NONE;*/
        YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 333 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 364 "src/scan-gram.l"
 {
     nesting = 0;
     token_start = loc->start;
     BEGIN SC_TAG;
+ flush();
+ piece[piece1++] = strdup("<Tag>");
   }
        YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 339 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 372 "src/scan-gram.l"
 {
     static int percent_percent_count;
     if (++percent_percent_count == 2)
@@ -2229,7 +2156,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 346 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 379 "src/scan-gram.l"
 {
     bracketed_id_str = NULL;
     bracketed_id_start = loc->start;
@@ -2239,15 +2166,15 @@ YY_RULE_SETUP
        YY_BREAK
 case 80:
 YY_RULE_SETUP
-#line 353 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 386 "src/scan-gram.l"
 {
     complain (loc, complaint, "%s: %s",
-              ngettext ("invalid character", "invalid characters", yyleng),
-              quote_mem (yytext, yyleng));
+              ngettext ("invalid character", "invalid characters", gram_leng),
+              quote_mem (gram_text, gram_leng));
   }
        YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 359 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 392 "src/scan-gram.l"
 {
     loc->start = loc->end = scanner_cursor;
     yyterminate ();
@@ -2262,7 +2189,7 @@ case YY_STATE_EOF(INITIAL):
 
 case 81:
 YY_RULE_SETUP
-#line 373 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 406 "src/scan-gram.l"
 complain (loc, complaint, _("invalid null character"));
        YY_BREAK
 
@@ -2273,9 +2200,9 @@ complain (loc, complaint, _("invalid null character"));
 
 case 82:
 YY_RULE_SETUP
-#line 383 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 416 "src/scan-gram.l"
 {
-    if (bracketed_id_str)
+    if (bracketed_id_str) /* SHOULDN'T THIS BE if (!bracketed_id_str) ??? */
       {
         ROLLBACK_CURRENT_TOKEN;
         BEGIN SC_RETURN_BRACKETED_ID;
@@ -2292,29 +2219,48 @@ YY_RULE_SETUP
        YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 398 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 431 "src/scan-gram.l"
 {
     BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
     *loc = id_loc;
+#if 1
+ piece[piece1++] = strdup(gram_text);
+ piece0 = piece0_save;
+ piece_pack();
+ return ~ID_COLON;
+#else
     return ID_COLON;
+#endif
   }
        YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 403 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 443 "src/scan-gram.l"
 {
     ROLLBACK_CURRENT_TOKEN;
     BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
     *loc = id_loc;
+#if 1
+ piece0 = piece0_save;
+ piece_pack();
+ return ~ID;
+#else
     return ID;
+#endif
   }
        YY_BREAK
 case YY_STATE_EOF(SC_AFTER_IDENTIFIER):
-#line 409 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 455 "src/scan-gram.l"
 {
     BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
     *loc = id_loc;
+#if 1
+ piece0 = piece0_save;
+ piece_pack();
+ return ~ID;
+#else
     return ID;
+#endif
   }
        YY_BREAK
 
@@ -2325,24 +2271,24 @@ case YY_STATE_EOF(SC_AFTER_IDENTIFIER):
 
 case 85:
 YY_RULE_SETUP
-#line 422 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 474 "src/scan-gram.l"
 {
     if (bracketed_id_str)
       {
         complain (loc, complaint,
                   _("unexpected identifier in bracketed name: %s"),
-                  quote (yytext));
+                  quote (gram_text));
       }
     else
       {
-        bracketed_id_str = uniqstr_new (yytext);
+        bracketed_id_str = uniqstr_new (gram_text);
         bracketed_id_loc = *loc;
       }
   }
        YY_BREAK
 case 86:
 YY_RULE_SETUP
-#line 435 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 487 "src/scan-gram.l"
 {
     BEGIN bracketed_id_context_state;
     if (bracketed_id_str)
@@ -2361,16 +2307,16 @@ YY_RULE_SETUP
        YY_BREAK
 case 87:
 YY_RULE_SETUP
-#line 451 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 503 "src/scan-gram.l"
 {
     complain (loc, complaint, "%s: %s",
               ngettext ("invalid character in bracketed name",
-                        "invalid characters in bracketed name", yyleng),
-              quote_mem (yytext, yyleng));
+                        "invalid characters in bracketed name", gram_leng),
+              quote_mem (gram_text, gram_leng));
   }
        YY_BREAK
 case YY_STATE_EOF(SC_BRACKETED_ID):
-#line 458 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 510 "src/scan-gram.l"
 {
     BEGIN bracketed_id_context_state;
     unexpected_eof (bracketed_id_start, "]");
@@ -2381,7 +2327,7 @@ case YY_STATE_EOF(SC_BRACKETED_ID):
 
 case 88:
 YY_RULE_SETUP
-#line 466 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 518 "src/scan-gram.l"
 {
     ROLLBACK_CURRENT_TOKEN;
     val->uniqstr = bracketed_id_str;
@@ -2399,17 +2345,17 @@ YY_RULE_SETUP
 
 case 89:
 YY_RULE_SETUP
-#line 483 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 535 "src/scan-gram.l"
 BEGIN context_state;
        YY_BREAK
 case 90:
 /* rule 90 can match eol */
 YY_RULE_SETUP
-#line 484 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 536 "src/scan-gram.l"
 continue;
        YY_BREAK
 case YY_STATE_EOF(SC_YACC_COMMENT):
-#line 485 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 537 "src/scan-gram.l"
 unexpected_eof (token_start, "*/"); BEGIN context_state;
        YY_BREAK
 
@@ -2421,11 +2367,11 @@ unexpected_eof (token_start, "*/"); BEGIN context_state;
 case 91:
 /* rule 91 can match eol */
 YY_RULE_SETUP
-#line 495 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 547 "src/scan-gram.l"
 STRING_GROW; BEGIN context_state;
        YY_BREAK
 case YY_STATE_EOF(SC_COMMENT):
-#line 496 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 548 "src/scan-gram.l"
 unexpected_eof (token_start, "*/"); BEGIN context_state;
        YY_BREAK
 
@@ -2437,17 +2383,17 @@ unexpected_eof (token_start, "*/"); BEGIN context_state;
 case 92:
 /* rule 92 can match eol */
 YY_RULE_SETUP
-#line 506 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 558 "src/scan-gram.l"
 STRING_GROW; BEGIN context_state;
        YY_BREAK
 case 93:
 /* rule 93 can match eol */
 YY_RULE_SETUP
-#line 507 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 559 "src/scan-gram.l"
 STRING_GROW;
        YY_BREAK
 case YY_STATE_EOF(SC_LINE_COMMENT):
-#line 508 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 560 "src/scan-gram.l"
 BEGIN context_state;
        YY_BREAK
 
@@ -2459,23 +2405,24 @@ BEGIN context_state;
 
 case 94:
 YY_RULE_SETUP
-#line 519 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 571 "src/scan-gram.l"
 {
     STRING_FINISH;
     loc->start = token_start;
     val->code = last_string;
     BEGIN INITIAL;
+ piece[piece1++] = strdup("</EscapedString>");
     return STRING;
   }
        YY_BREAK
 case YY_STATE_EOF(SC_ESCAPED_STRING):
-#line 526 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 579 "src/scan-gram.l"
 unexpected_eof (token_start, "\"");
        YY_BREAK
 case 95:
 /* rule 95 can match eol */
 YY_RULE_SETUP
-#line 527 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 580 "src/scan-gram.l"
 unexpected_newline (token_start, "\"");
        YY_BREAK
 
@@ -2487,7 +2434,7 @@ unexpected_newline (token_start, "\"");
 
 case 96:
 YY_RULE_SETUP
-#line 537 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 590 "src/scan-gram.l"
 {
     STRING_FINISH;
     loc->start = token_start;
@@ -2505,17 +2452,18 @@ YY_RULE_SETUP
                 _("extra characters in character literal"));
     STRING_FREE;
     BEGIN INITIAL;
+ piece[piece1++] = strdup("</EscapedCharacter>");
     return CHAR;
   }
        YY_BREAK
 case 97:
 /* rule 97 can match eol */
 YY_RULE_SETUP
-#line 556 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 610 "src/scan-gram.l"
 unexpected_newline (token_start, "'");
        YY_BREAK
 case YY_STATE_EOF(SC_ESCAPED_CHARACTER):
-#line 557 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 611 "src/scan-gram.l"
 unexpected_eof (token_start, "'");
        YY_BREAK
 
@@ -2526,7 +2474,7 @@ unexpected_eof (token_start, "'");
 
 case 98:
 YY_RULE_SETUP
-#line 568 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 622 "src/scan-gram.l"
 {
     --nesting;
     if (nesting < 0)
@@ -2536,6 +2484,7 @@ YY_RULE_SETUP
         val->uniqstr = uniqstr_new (last_string);
         STRING_FREE;
         BEGIN INITIAL;
+ piece[piece1++] = strdup("</Tag>");
         return TAG;
       }
     STRING_GROW;
@@ -2544,16 +2493,16 @@ YY_RULE_SETUP
 case 99:
 /* rule 99 can match eol */
 YY_RULE_SETUP
-#line 582 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 637 "src/scan-gram.l"
 STRING_GROW;
        YY_BREAK
 case 100:
 YY_RULE_SETUP
-#line 583 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-STRING_GROW; nesting += yyleng;
+#line 638 "src/scan-gram.l"
+STRING_GROW; nesting += gram_leng;
        YY_BREAK
 case YY_STATE_EOF(SC_TAG):
-#line 585 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 640 "src/scan-gram.l"
 unexpected_eof (token_start, ">");
        YY_BREAK
 
@@ -2564,88 +2513,106 @@ unexpected_eof (token_start, ">");
 
 case 101:
 YY_RULE_SETUP
-#line 594 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 649 "src/scan-gram.l"
 {
-    unsigned long int c = strtoul (yytext + 1, NULL, 8);
+    unsigned long int c = strtoul (gram_text + 1, NULL, 8);
     if (!c || UCHAR_MAX < c)
       complain (loc, complaint, _("invalid number after \\-escape: %s"),
-                   yytext+1);
+                   gram_text+1);
     else
+ {
       obstack_1grow (&obstack_for_string, c);
+  sprintf(piece_temp, "<Escape char=\"%d\">", (int)c);
+  piece[piece1++] = strdup(piece_temp);
+  flush();
+  piece[piece1++] = strdup("</Escape>"); 
+ }
   }
        YY_BREAK
 case 102:
 YY_RULE_SETUP
-#line 603 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 664 "src/scan-gram.l"
 {
     verify (UCHAR_MAX < ULONG_MAX);
-    unsigned long int c = strtoul (yytext + 2, NULL, 16);
+    unsigned long int c = strtoul (gram_text + 2, NULL, 16);
     if (!c || UCHAR_MAX < c)
       complain (loc, complaint, _("invalid number after \\-escape: %s"),
-                   yytext+1);
+                   gram_text+1);
     else
+ {
       obstack_1grow (&obstack_for_string, c);
+  sprintf(piece_temp, "<Escape char=\"%d\">", (int)c);
+  piece[piece1++] = strdup(piece_temp);
+  flush();
+  piece[piece1++] = strdup("</Escape>"); 
+ }
   }
        YY_BREAK
 case 103:
 YY_RULE_SETUP
-#line 613 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-obstack_1grow (&obstack_for_string, '\a');
+#line 680 "src/scan-gram.l"
+obstack_1grow (&obstack_for_string, '\a'); piece[piece1++] = strdup("<Escape char=\"7\">"); flush(); piece[piece1++] = strdup("</Escape>");
        YY_BREAK
 case 104:
 YY_RULE_SETUP
-#line 614 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-obstack_1grow (&obstack_for_string, '\b');
+#line 681 "src/scan-gram.l"
+obstack_1grow (&obstack_for_string, '\b'); piece[piece1++] = strdup("<Escape char=\"8\">"); flush(); piece[piece1++] = strdup("</Escape>");
        YY_BREAK
 case 105:
 YY_RULE_SETUP
-#line 615 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-obstack_1grow (&obstack_for_string, '\f');
+#line 682 "src/scan-gram.l"
+obstack_1grow (&obstack_for_string, '\f'); piece[piece1++] = strdup("<Escape char=\"12\">"); flush(); piece[piece1++] = strdup("</Escape>");
        YY_BREAK
 case 106:
 YY_RULE_SETUP
-#line 616 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-obstack_1grow (&obstack_for_string, '\n');
+#line 683 "src/scan-gram.l"
+obstack_1grow (&obstack_for_string, '\n'); piece[piece1++] = strdup("<Escape char=\"10\">"); flush(); piece[piece1++] = strdup("</Escape>");
        YY_BREAK
 case 107:
 YY_RULE_SETUP
-#line 617 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-obstack_1grow (&obstack_for_string, '\r');
+#line 684 "src/scan-gram.l"
+obstack_1grow (&obstack_for_string, '\r'); piece[piece1++] = strdup("<Escape char=\"13\">"); flush(); piece[piece1++] = strdup("</Escape>");
        YY_BREAK
 case 108:
 YY_RULE_SETUP
-#line 618 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-obstack_1grow (&obstack_for_string, '\t');
+#line 685 "src/scan-gram.l"
+obstack_1grow (&obstack_for_string, '\t'); piece[piece1++] = strdup("<Escape char=\"9\">"); flush(); piece[piece1++] = strdup("</Escape>");
        YY_BREAK
 case 109:
 YY_RULE_SETUP
-#line 619 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-obstack_1grow (&obstack_for_string, '\v');
+#line 686 "src/scan-gram.l"
+obstack_1grow (&obstack_for_string, '\v'); piece[piece1++] = strdup("<Escape char=\"11\">"); flush(); piece[piece1++] = strdup("</Escape>");
        YY_BREAK
 /* \\[\"\'?\\] would be shorter, but it confuses xgettext.  */
 case 110:
 YY_RULE_SETUP
-#line 622 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-obstack_1grow (&obstack_for_string, yytext[1]);
+#line 689 "src/scan-gram.l"
+obstack_1grow (&obstack_for_string, gram_text[1]); sprintf(piece_temp, "<Escape char=\"%d\">", gram_text[1]); piece[piece1++] = strdup(piece_temp); flush(); piece[piece1++] = strdup("</Escape>"); 
        YY_BREAK
 case 111:
 YY_RULE_SETUP
-#line 624 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 691 "src/scan-gram.l"
 {
-    int c = convert_ucn_to_byte (yytext);
+    int c = convert_ucn_to_byte (gram_text);
     if (c <= 0)
       complain (loc, complaint, _("invalid number after \\-escape: %s"),
-                   yytext+1);
+                   gram_text+1);
     else
+ {
       obstack_1grow (&obstack_for_string, c);
+  sprintf(piece_temp, "<Escape char=\"%d\">", c);
+  piece[piece1++] = strdup(piece_temp);
+  flush();
+  piece[piece1++] = strdup("</Escape>"); 
+ }
   }
        YY_BREAK
 case 112:
 /* rule 112 can match eol */
 YY_RULE_SETUP
-#line 632 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 705 "src/scan-gram.l"
 {
-    char const *p = yytext + 1;
+    char const *p = gram_text + 1;
     /* Quote only if escaping won't make the character visible.  */
     if (c_isspace ((unsigned char) *p) && c_isprint ((unsigned char) *p))
       p = quote (p);
@@ -2664,7 +2631,7 @@ YY_RULE_SETUP
 case 113:
 /* rule 113 can match eol */
 YY_RULE_SETUP
-#line 650 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 723 "src/scan-gram.l"
 STRING_GROW;
        YY_BREAK
 
@@ -2672,17 +2639,17 @@ STRING_GROW;
 
 case 114:
 YY_RULE_SETUP
-#line 655 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-STRING_GROW; BEGIN context_state;
+#line 728 "src/scan-gram.l"
+STRING_GROW; BEGIN context_state; /*piece[piece1++] = strdup("</Character>");*/
        YY_BREAK
 case 115:
 /* rule 115 can match eol */
 YY_RULE_SETUP
-#line 656 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 729 "src/scan-gram.l"
 unexpected_newline (token_start, "'");
        YY_BREAK
 case YY_STATE_EOF(SC_CHARACTER):
-#line 657 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 730 "src/scan-gram.l"
 unexpected_eof (token_start, "'");
        YY_BREAK
 
@@ -2690,17 +2657,17 @@ unexpected_eof (token_start, "'");
 
 case 116:
 YY_RULE_SETUP
-#line 662 "/Users/akim/src/gnu/bison/src/scan-gram.l"
-STRING_GROW; BEGIN context_state;
+#line 735 "src/scan-gram.l"
+STRING_GROW; BEGIN context_state; /*piece[piece1++] = strdup("</String>");*/
        YY_BREAK
 case 117:
 /* rule 117 can match eol */
 YY_RULE_SETUP
-#line 663 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 736 "src/scan-gram.l"
 unexpected_newline (token_start, "\"");
        YY_BREAK
 case YY_STATE_EOF(SC_STRING):
-#line 664 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 737 "src/scan-gram.l"
 unexpected_eof (token_start, "\"");
        YY_BREAK
 
@@ -2711,28 +2678,32 @@ unexpected_eof (token_start, "\"");
 
 case 118:
 YY_RULE_SETUP
-#line 674 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 747 "src/scan-gram.l"
 {
     STRING_GROW;
     context_state = YY_START;
     token_start = loc->start;
+ /*flush();
+ piece[piece1++] = strdup("<Character>");*/
     BEGIN SC_CHARACTER;
   }
        YY_BREAK
 case 119:
 YY_RULE_SETUP
-#line 680 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 755 "src/scan-gram.l"
 {
     STRING_GROW;
     context_state = YY_START;
     token_start = loc->start;
+ /*flush();
+ piece[piece1++] = strdup("<String>");*/
     BEGIN SC_STRING;
   }
        YY_BREAK
 case 120:
 /* rule 120 can match eol */
 YY_RULE_SETUP
-#line 686 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 763 "src/scan-gram.l"
 {
     STRING_GROW;
     context_state = YY_START;
@@ -2743,7 +2714,7 @@ YY_RULE_SETUP
 case 121:
 /* rule 121 can match eol */
 YY_RULE_SETUP
-#line 692 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 769 "src/scan-gram.l"
 {
     STRING_GROW;
     context_state = YY_START;
@@ -2760,13 +2731,13 @@ YY_RULE_SETUP
 case 122:
 /* rule 122 can match eol */
 YY_RULE_SETUP
-#line 708 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 785 "src/scan-gram.l"
 STRING_GROW; nesting++;
        YY_BREAK
 case 123:
 /* rule 123 can match eol */
 YY_RULE_SETUP
-#line 709 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 786 "src/scan-gram.l"
 STRING_GROW; nesting--;
        YY_BREAK
 /* Tokenize '<<%' correctly (as '<<' '%') rather than incorrrectly
@@ -2774,12 +2745,12 @@ STRING_GROW; nesting--;
 case 124:
 /* rule 124 can match eol */
 YY_RULE_SETUP
-#line 713 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 790 "src/scan-gram.l"
 STRING_GROW;
        YY_BREAK
 case YY_STATE_EOF(SC_BRACED_CODE):
 case YY_STATE_EOF(SC_PREDICATE):
-#line 715 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 792 "src/scan-gram.l"
 unexpected_eof (code_start, "}");
        YY_BREAK
 
@@ -2787,7 +2758,7 @@ unexpected_eof (code_start, "}");
 
 case 125:
 YY_RULE_SETUP
-#line 720 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 797 "src/scan-gram.l"
 {
     obstack_1grow (&obstack_for_string, '}');
 
@@ -2798,6 +2769,7 @@ YY_RULE_SETUP
         loc->start = code_start;
         val->code = last_string;
         BEGIN INITIAL;
+ piece[piece1++] = strdup("</BracedCode>"); 
         return BRACED_CODE;
       }
   }
@@ -2807,7 +2779,7 @@ YY_RULE_SETUP
 
 case 126:
 YY_RULE_SETUP
-#line 737 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 815 "src/scan-gram.l"
 {
     --nesting;
     if (nesting < 0)
@@ -2816,6 +2788,7 @@ YY_RULE_SETUP
         loc->start = code_start;
         val->code = last_string;
         BEGIN INITIAL;
+ piece[piece1++] = strdup("</Predicate>");
         return BRACED_PREDICATE;
       }
     else
@@ -2830,17 +2803,18 @@ YY_RULE_SETUP
 
 case 127:
 YY_RULE_SETUP
-#line 758 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 837 "src/scan-gram.l"
 {
     STRING_FINISH;
     loc->start = code_start;
     val->code = last_string;
     BEGIN INITIAL;
+ piece[piece1++] = strdup("</Prologue>");
     return PROLOGUE;
   }
        YY_BREAK
 case YY_STATE_EOF(SC_PROLOGUE):
-#line 766 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 846 "src/scan-gram.l"
 unexpected_eof (code_start, "%}");
        YY_BREAK
 
@@ -2851,7 +2825,7 @@ unexpected_eof (code_start, "%}");
 
 
 case YY_STATE_EOF(SC_EPILOGUE):
-#line 777 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 857 "src/scan-gram.l"
 {
     STRING_FINISH;
     loc->start = code_start;
@@ -2865,19 +2839,19 @@ case YY_STATE_EOF(SC_EPILOGUE):
   | By default, grow the string obstack with the input.  |
   `-----------------------------------------------------*/
 case 128:
-#line 792 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 872 "src/scan-gram.l"
 case 129:
 /* rule 129 can match eol */
 YY_RULE_SETUP
-#line 792 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 872 "src/scan-gram.l"
 STRING_GROW;
        YY_BREAK
 case 130:
 YY_RULE_SETUP
-#line 794 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 874 "src/scan-gram.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
        YY_BREAK
-#line 2880 "src/scan-gram.c"
+#line 2743 "src/scan-gram.c"
 case YY_STATE_EOF(SC_RETURN_BRACKETED_ID):
        yyterminate();
 
@@ -2894,19 +2868,15 @@ case YY_STATE_EOF(SC_RETURN_BRACKETED_ID):
                        {
                        /* We're scanning a new file or input source.  It's
                         * possible that this happened because the user
-                        * just pointed yyin at a new source and called
-                        * yylex().  If so, then we have to assure
+                        * just pointed gram_in at a new source and called
+                        * gram_lex().  If so, then we have to assure
                         * consistency between YY_CURRENT_BUFFER and our
                         * globals.  Here is the right place to do so, because
                         * this is the first action (other than possibly a
                         * back-up) that will match for the new input source.
                         */
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-/* %if-c-only */
-                       YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+                       YY_CURRENT_BUFFER_LVALUE->yy_input_file = gram_in;
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
                        }
 
@@ -2961,11 +2931,11 @@ case YY_STATE_EOF(SC_RETURN_BRACKETED_ID):
                                {
                                (yy_did_buffer_switch_on_eof) = 0;
 
-                               if ( yywrap(  ) )
+                               if ( gram_wrap( ) )
                                        {
                                        /* Note: because we've taken care in
                                         * yy_get_next_buffer() to have set up
-                                        * yytext, we can now set up
+                                        * gram_text, we can now set up
                                         * yy_c_buf_p so that if some total
                                         * hoser (like flex itself) wants to
                                         * call the scanner after we return the
@@ -3014,12 +2984,12 @@ case YY_STATE_EOF(SC_RETURN_BRACKETED_ID):
                        "fatal flex scanner internal error--no action found" );
        } /* end of action switch */
                } /* end of scanning one token */
-       } /* end of user's declarations */
-} /* end of yylex */
+} /* end of gram_lex */
 /* %ok-for-header */
 
 /* %if-c++-only */
 /* %not-for-header */
+
 /* %ok-for-header */
 
 /* %endif */
@@ -3037,9 +3007,9 @@ static int yy_get_next_buffer (void)
 /* %if-c++-only */
 /* %endif */
 {
-       char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-       char *source = (yytext_ptr);
-       int number_to_move, i;
+       register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+       register char *source = (yytext_ptr);
+       register int number_to_move, i;
        int ret_val;
 
        if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -3068,7 +3038,7 @@ static int yy_get_next_buffer (void)
        /* Try to read more data. */
 
        /* First move last chars to start of buffer. */
-       number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+       number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
 
        for ( i = 0; i < number_to_move; ++i )
                *(dest++) = *(source++);
@@ -3088,7 +3058,7 @@ static int yy_get_next_buffer (void)
                        { /* Not enough room in the buffer - grow it. */
 
                        /* just a shorter name for the current buffer */
-                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
 
                        int yy_c_buf_p_offset =
                                (int) ((yy_c_buf_p) - b->yy_ch_buf);
@@ -3104,12 +3074,11 @@ static int yy_get_next_buffer (void)
 
                                b->yy_ch_buf = (char *)
                                        /* Include room in for 2 EOB chars. */
-                                       yyrealloc( (void *) b->yy_ch_buf,
-                                                        (yy_size_t) (b->yy_buf_size + 2)  );
+                                       gram_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
                                }
                        else
                                /* Can't grow it, we don't own it. */
-                               b->yy_ch_buf = NULL;
+                               b->yy_ch_buf = 0;
 
                        if ( ! b->yy_ch_buf )
                                YY_FATAL_ERROR(
@@ -3127,7 +3096,7 @@ static int yy_get_next_buffer (void)
 
                /* Read in more data. */
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-                       (yy_n_chars), num_to_read );
+                       (yy_n_chars), (size_t) num_to_read );
 
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
                }
@@ -3137,7 +3106,7 @@ static int yy_get_next_buffer (void)
                if ( number_to_move == YY_MORE_ADJ )
                        {
                        ret_val = EOB_ACT_END_OF_FILE;
-                       yyrestart( yyin  );
+                       gram_restart(gram_in  );
                        }
 
                else
@@ -3151,15 +3120,12 @@ static int yy_get_next_buffer (void)
        else
                ret_val = EOB_ACT_CONTINUE_SCAN;
 
-       if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+       if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
                /* Extend the array by 50%, plus the number we really need. */
-               int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
-                       (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
+               yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) gram_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
                if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
                        YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-               /* "- 2" to take care of EOB's */
-               YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
        }
 
        (yy_n_chars) += number_to_move;
@@ -3175,13 +3141,14 @@ static int yy_get_next_buffer (void)
 
 /* %if-c-only */
 /* %not-for-header */
+
     static yy_state_type yy_get_previous_state (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
-       yy_state_type yy_current_state;
-       char *yy_cp;
+       register yy_state_type yy_current_state;
+       register char *yy_cp;
     
 /* %% [15.0] code to get the start state into yy_current_state goes here */
        yy_current_state = (yy_start);
@@ -3190,7 +3157,7 @@ static int yy_get_next_buffer (void)
        for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
                {
 /* %% [16.0] code to find the next state goes here */
-               YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 58);
+               register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 58);
                if ( yy_accept[yy_current_state] )
                        {
                        (yy_last_accepting_state) = yy_current_state;
@@ -3200,9 +3167,9 @@ static int yy_get_next_buffer (void)
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
                        if ( yy_current_state >= 579 )
-                               yy_c = yy_meta[yy_c];
+                               yy_c = yy_meta[(unsigned int) yy_c];
                        }
-               yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+               yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                }
 
        return yy_current_state;
@@ -3219,11 +3186,11 @@ static int yy_get_next_buffer (void)
 /* %if-c++-only */
 /* %endif */
 {
-       int yy_is_jam;
+       register int yy_is_jam;
     /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
-       char *yy_cp = (yy_c_buf_p);
+       register char *yy_cp = (yy_c_buf_p);
 
-       YY_CHAR yy_c = 58;
+       register YY_CHAR yy_c = 58;
        if ( yy_accept[yy_current_state] )
                {
                (yy_last_accepting_state) = yy_current_state;
@@ -3233,36 +3200,35 @@ static int yy_get_next_buffer (void)
                {
                yy_current_state = (int) yy_def[yy_current_state];
                if ( yy_current_state >= 579 )
-                       yy_c = yy_meta[yy_c];
+                       yy_c = yy_meta[(unsigned int) yy_c];
                }
-       yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
        yy_is_jam = (yy_current_state == 578);
 
-               return yy_is_jam ? 0 : yy_current_state;
+       return yy_is_jam ? 0 : yy_current_state;
 }
 
-#ifndef YY_NO_UNPUT
 /* %if-c-only */
 
-    static void yyunput (int c, char * yy_bp )
+    static void yyunput (int c, register char * yy_bp )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
-       char *yy_cp;
+       register char *yy_cp;
     
     yy_cp = (yy_c_buf_p);
 
-       /* undo effects of setting up yytext */
+       /* undo effects of setting up gram_text */
        *yy_cp = (yy_hold_char);
 
        if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
                { /* need to shift things up to make room */
                /* +2 for EOB chars. */
-               int number_to_move = (yy_n_chars) + 2;
-               char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+               register int number_to_move = (yy_n_chars) + 2;
+               register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
                                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-               char *source =
+               register char *source =
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
 
                while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -3271,7 +3237,7 @@ static int yy_get_next_buffer (void)
                yy_cp += (int) (dest - source);
                yy_bp += (int) (dest - source);
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-                       (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+                       (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
 
                if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
@@ -3279,7 +3245,7 @@ static int yy_get_next_buffer (void)
 
        *--yy_cp = (char) c;
 
-/* %% [18.0] update yylineno here */
+/* %% [18.0] update gram_lineno here */
 
        (yytext_ptr) = yy_bp;
        (yy_hold_char) = *yy_cp;
@@ -3288,7 +3254,6 @@ static int yy_get_next_buffer (void)
 /* %if-c-only */
 
 /* %endif */
-#endif
 
 /* %if-c-only */
 #ifndef YY_NO_INPUT
@@ -3318,7 +3283,7 @@ static int yy_get_next_buffer (void)
 
                else
                        { /* need more input */
-                       int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+                       int offset = (yy_c_buf_p) - (yytext_ptr);
                        ++(yy_c_buf_p);
 
                        switch ( yy_get_next_buffer(  ) )
@@ -3335,14 +3300,14 @@ static int yy_get_next_buffer (void)
                                         */
 
                                        /* Reset buffer status. */
-                                       yyrestart( yyin );
+                                       gram_restart(gram_in );
 
                                        /*FALLTHROUGH*/
 
                                case EOB_ACT_END_OF_FILE:
                                        {
-                                       if ( yywrap(  ) )
-                                               return 0;
+                                       if ( gram_wrap( ) )
+                                               return EOF;
 
                                        if ( ! (yy_did_buffer_switch_on_eof) )
                                                YY_NEW_FILE;
@@ -3361,10 +3326,10 @@ static int yy_get_next_buffer (void)
                }
 
        c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
-       *(yy_c_buf_p) = '\0';   /* preserve yytext */
+       *(yy_c_buf_p) = '\0';   /* preserve gram_text */
        (yy_hold_char) = *++(yy_c_buf_p);
 
-/* %% [19.0] update BOL and yylineno */
+/* %% [19.0] update BOL and gram_lineno */
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
 
        return c;
@@ -3379,31 +3344,28 @@ static int yy_get_next_buffer (void)
  * @note This function does not reset the start condition to @c INITIAL .
  */
 /* %if-c-only */
-    void yyrestart  (FILE * input_file )
+    void gram_restart  (FILE * input_file )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
     
        if ( ! YY_CURRENT_BUFFER ){
-        yyensure_buffer_stack ();
+        gram_ensure_buffer_stack ();
                YY_CURRENT_BUFFER_LVALUE =
-            yy_create_buffer( yyin, YY_BUF_SIZE );
+            gram__create_buffer(gram_in,YY_BUF_SIZE );
        }
 
-       yy_init_buffer( YY_CURRENT_BUFFER, input_file );
-       yy_load_buffer_state(  );
+       gram__init_buffer(YY_CURRENT_BUFFER,input_file );
+       gram__load_buffer_state( );
 }
 
-/* %if-c++-only */
-/* %endif */
-
 /** Switch to a different input buffer.
  * @param new_buffer The new input buffer.
  * 
  */
 /* %if-c-only */
-    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+    void gram__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -3411,10 +3373,10 @@ static int yy_get_next_buffer (void)
     
        /* TODO. We should be able to replace this entire function body
         * with
-        *              yypop_buffer_state();
-        *              yypush_buffer_state(new_buffer);
+        *              gram_pop_buffer_state();
+        *              gram_push_buffer_state(new_buffer);
      */
-       yyensure_buffer_stack ();
+       gram_ensure_buffer_stack ();
        if ( YY_CURRENT_BUFFER == new_buffer )
                return;
 
@@ -3427,29 +3389,25 @@ static int yy_get_next_buffer (void)
                }
 
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
-       yy_load_buffer_state(  );
+       gram__load_buffer_state( );
 
        /* We don't actually know whether we did this switch during
-        * EOF (yywrap()) processing, but the only time this flag
-        * is looked at is after yywrap() is called, so it's safe
+        * EOF (gram_wrap()) processing, but the only time this flag
+        * is looked at is after gram_wrap() is called, so it's safe
         * to go ahead and always set it.
         */
        (yy_did_buffer_switch_on_eof) = 1;
 }
 
 /* %if-c-only */
-static void yy_load_buffer_state  (void)
+static void gram__load_buffer_state  (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
        (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-/* %if-c-only */
-       yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+       gram_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
        (yy_hold_char) = *(yy_c_buf_p);
 }
 
@@ -3460,42 +3418,39 @@ static void yy_load_buffer_state  (void)
  * @return the allocated buffer state.
  */
 /* %if-c-only */
-    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
+    YY_BUFFER_STATE gram__create_buffer  (FILE * file, int  size )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
        YY_BUFFER_STATE b;
     
-       b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
+       b = (YY_BUFFER_STATE) gram_alloc(sizeof( struct yy_buffer_state )  );
        if ( ! b )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+               YY_FATAL_ERROR( "out of dynamic memory in gram__create_buffer()" );
 
        b->yy_buf_size = size;
 
        /* yy_ch_buf has to be 2 characters longer than the size given because
         * we need to put in 2 end-of-buffer characters.
         */
-       b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
+       b->yy_ch_buf = (char *) gram_alloc(b->yy_buf_size + 2  );
        if ( ! b->yy_ch_buf )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+               YY_FATAL_ERROR( "out of dynamic memory in gram__create_buffer()" );
 
        b->yy_is_our_buffer = 1;
 
-       yy_init_buffer( b, file );
+       gram__init_buffer(b,file );
 
        return b;
 }
 
-/* %if-c++-only */
-/* %endif */
-
 /** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with gram__create_buffer()
  * 
  */
 /* %if-c-only */
-    void yy_delete_buffer (YY_BUFFER_STATE  b )
+    void gram__delete_buffer (YY_BUFFER_STATE  b )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -3508,17 +3463,24 @@ static void yy_load_buffer_state  (void)
                YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
 
        if ( b->yy_is_our_buffer )
-               yyfree( (void *) b->yy_ch_buf  );
+               gram_free((void *) b->yy_ch_buf  );
 
-       yyfree( (void *) b  );
+       gram_free((void *) b  );
 }
 
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
+ * such as during a gram_restart() or at EOF.
  */
 /* %if-c-only */
-    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+    static void gram__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -3526,17 +3488,13 @@ static void yy_load_buffer_state  (void)
 {
        int oerrno = errno;
     
-       yy_flush_buffer( b );
+       gram__flush_buffer(b );
 
-/* %if-c-only */
        b->yy_input_file = file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
        b->yy_fill_buffer = 1;
 
-    /* If b is the current buffer, then yy_init_buffer was _probably_
-     * called from yyrestart() or through yy_get_next_buffer.
+    /* If b is the current buffer, then gram__init_buffer was _probably_
+     * called from gram_restart() or through yy_get_next_buffer.
      * In that case, we don't want to reset the lineno or column.
      */
     if (b != YY_CURRENT_BUFFER){
@@ -3559,7 +3517,7 @@ static void yy_load_buffer_state  (void)
  * 
  */
 /* %if-c-only */
-    void yy_flush_buffer (YY_BUFFER_STATE  b )
+    void gram__flush_buffer (YY_BUFFER_STATE  b )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -3582,7 +3540,7 @@ static void yy_load_buffer_state  (void)
        b->yy_buffer_status = YY_BUFFER_NEW;
 
        if ( b == YY_CURRENT_BUFFER )
-               yy_load_buffer_state(  );
+               gram__load_buffer_state( );
 }
 
 /* %if-c-or-c++ */
@@ -3593,7 +3551,7 @@ static void yy_load_buffer_state  (void)
  *  
  */
 /* %if-c-only */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void gram_push_buffer_state (YY_BUFFER_STATE new_buffer )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -3601,9 +3559,9 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
        if (new_buffer == NULL)
                return;
 
-       yyensure_buffer_stack();
+       gram_ensure_buffer_stack();
 
-       /* This block is copied from yy_switch_to_buffer. */
+       /* This block is copied from gram__switch_to_buffer. */
        if ( YY_CURRENT_BUFFER )
                {
                /* Flush out information for old buffer. */
@@ -3617,8 +3575,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
                (yy_buffer_stack_top)++;
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
-       /* copied from yy_switch_to_buffer. */
-       yy_load_buffer_state(  );
+       /* copied from gram__switch_to_buffer. */
+       gram__load_buffer_state( );
        (yy_did_buffer_switch_on_eof) = 1;
 }
 /* %endif */
@@ -3629,7 +3587,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
  *  
  */
 /* %if-c-only */
-void yypop_buffer_state (void)
+void gram_pop_buffer_state (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -3637,13 +3595,13 @@ void yypop_buffer_state (void)
        if (!YY_CURRENT_BUFFER)
                return;
 
-       yy_delete_buffer(YY_CURRENT_BUFFER );
+       gram__delete_buffer(YY_CURRENT_BUFFER );
        YY_CURRENT_BUFFER_LVALUE = NULL;
        if ((yy_buffer_stack_top) > 0)
                --(yy_buffer_stack_top);
 
        if (YY_CURRENT_BUFFER) {
-               yy_load_buffer_state(  );
+               gram__load_buffer_state( );
                (yy_did_buffer_switch_on_eof) = 1;
        }
 }
@@ -3654,12 +3612,12 @@ void yypop_buffer_state (void)
  *  Guarantees space for at least one push.
  */
 /* %if-c-only */
-static void yyensure_buffer_stack (void)
+static void gram_ensure_buffer_stack (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
-       yy_size_t num_to_alloc;
+       int num_to_alloc;
     
        if (!(yy_buffer_stack)) {
 
@@ -3667,15 +3625,15 @@ static void yyensure_buffer_stack (void)
                 * scanner will even need a stack. We use 2 instead of 1 to avoid an
                 * immediate realloc on the next call.
          */
-      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
-               (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+               num_to_alloc = 1;
+               (yy_buffer_stack) = (struct yy_buffer_state**)gram_alloc
                                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
                                                                );
                if ( ! (yy_buffer_stack) )
-                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+                       YY_FATAL_ERROR( "out of dynamic memory in gram_ensure_buffer_stack()" );
+                                                                 
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+                               
                (yy_buffer_stack_max) = num_to_alloc;
                (yy_buffer_stack_top) = 0;
                return;
@@ -3684,15 +3642,15 @@ static void yyensure_buffer_stack (void)
        if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 
                /* Increase the buffer to prepare for a possible push. */
-               yy_size_t grow_size = 8 /* arbitrary grow size */;
+               int grow_size = 8 /* arbitrary grow size */;
 
                num_to_alloc = (yy_buffer_stack_max) + grow_size;
-               (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+               (yy_buffer_stack) = (struct yy_buffer_state**)gram_realloc
                                                                ((yy_buffer_stack),
                                                                num_to_alloc * sizeof(struct yy_buffer_state*)
                                                                );
                if ( ! (yy_buffer_stack) )
-                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+                       YY_FATAL_ERROR( "out of dynamic memory in gram_ensure_buffer_stack()" );
 
                /* zero only the new slots.*/
                memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -3706,9 +3664,9 @@ static void yyensure_buffer_stack (void)
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
  * 
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object. 
  */
-YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
+YY_BUFFER_STATE gram__scan_buffer  (char * base, yy_size_t  size )
 {
        YY_BUFFER_STATE b;
     
@@ -3716,53 +3674,53 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
             base[size-1] != YY_END_OF_BUFFER_CHAR )
                /* They forgot to leave room for the EOB's. */
-               return NULL;
+               return 0;
 
-       b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
+       b = (YY_BUFFER_STATE) gram_alloc(sizeof( struct yy_buffer_state )  );
        if ( ! b )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+               YY_FATAL_ERROR( "out of dynamic memory in gram__scan_buffer()" );
 
-       b->yy_buf_size = (int) (size - 2);      /* "- 2" to take care of EOB's */
+       b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
        b->yy_buf_pos = b->yy_ch_buf = base;
        b->yy_is_our_buffer = 0;
-       b->yy_input_file = NULL;
+       b->yy_input_file = 0;
        b->yy_n_chars = b->yy_buf_size;
        b->yy_is_interactive = 0;
        b->yy_at_bol = 1;
        b->yy_fill_buffer = 0;
        b->yy_buffer_status = YY_BUFFER_NEW;
 
-       yy_switch_to_buffer( b  );
+       gram__switch_to_buffer(b  );
 
        return b;
 }
 /* %endif */
 
 /* %if-c-only */
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to gram_lex() will
  * scan from a @e copy of @a str.
  * @param yystr a NUL-terminated string to scan
  * 
  * @return the newly allocated buffer state object.
  * @note If you want to scan bytes that may contain NUL values, then use
- *       yy_scan_bytes() instead.
+ *       gram__scan_bytes() instead.
  */
-YY_BUFFER_STATE yy_scan_string (const char * yystr )
+YY_BUFFER_STATE gram__scan_string (yyconst char * yystr )
 {
     
-       return yy_scan_bytes( yystr, (int) strlen(yystr) );
+       return gram__scan_bytes(yystr,strlen(yystr) );
 }
 /* %endif */
 
 /* %if-c-only */
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to gram_lex() will
  * scan from a @e copy of @a bytes.
  * @param yybytes the byte buffer to scan
  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */
-YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
+YY_BUFFER_STATE gram__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
 {
        YY_BUFFER_STATE b;
        char *buf;
@@ -3770,19 +3728,19 @@ YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
        int i;
     
        /* Get memory for full buffer, including space for trailing EOB's. */
-       n = (yy_size_t) (_yybytes_len + 2);
-       buf = (char *) yyalloc( n  );
+       n = _yybytes_len + 2;
+       buf = (char *) gram_alloc(n  );
        if ( ! buf )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+               YY_FATAL_ERROR( "out of dynamic memory in gram__scan_bytes()" );
 
        for ( i = 0; i < _yybytes_len; ++i )
                buf[i] = yybytes[i];
 
        buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
 
-       b = yy_scan_buffer( buf, n );
+       b = gram__scan_buffer(buf,n );
        if ( ! b )
-               YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+               YY_FATAL_ERROR( "bad buffer in gram__scan_bytes()" );
 
        /* It's okay to grow etc. this buffer, and we should throw it
         * away when we're done.
@@ -3798,9 +3756,9 @@ YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
 #endif
 
 /* %if-c-only */
-static void yynoreturn yy_fatal_error (const char* msg )
+static void yy_fatal_error (yyconst char* msg )
 {
-                       fprintf( stderr, "%s\n", msg );
+       (void) fprintf( stderr, "%s\n", msg );
        exit( YY_EXIT_FAILURE );
 }
 /* %endif */
@@ -3813,14 +3771,14 @@ static void yynoreturn yy_fatal_error (const char* msg )
 #define yyless(n) \
        do \
                { \
-               /* Undo effects of setting up yytext. */ \
+               /* Undo effects of setting up gram_text. */ \
         int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
-               yytext[yyleng] = (yy_hold_char); \
-               (yy_c_buf_p) = yytext + yyless_macro_arg; \
+               gram_text[gram_leng] = (yy_hold_char); \
+               (yy_c_buf_p) = gram_text + yyless_macro_arg; \
                (yy_hold_char) = *(yy_c_buf_p); \
                *(yy_c_buf_p) = '\0'; \
-               yyleng = yyless_macro_arg; \
+               gram_leng = yyless_macro_arg; \
                } \
        while ( 0 )
 
@@ -3833,82 +3791,82 @@ static void yynoreturn yy_fatal_error (const char* msg )
 /** Get the current line number.
  * 
  */
-int yyget_lineno  (void)
+int gram_get_lineno  (void)
 {
-    
-    return yylineno;
+        
+    return gram_lineno;
 }
 
 /** Get the input stream.
  * 
  */
-FILE *yyget_in  (void)
+FILE *gram_get_in  (void)
 {
-        return yyin;
+        return gram_in;
 }
 
 /** Get the output stream.
  * 
  */
-FILE *yyget_out  (void)
+FILE *gram_get_out  (void)
 {
-        return yyout;
+        return gram_out;
 }
 
 /** Get the length of the current token.
  * 
  */
-int yyget_leng  (void)
+int gram_get_leng  (void)
 {
-        return yyleng;
+        return gram_leng;
 }
 
 /** Get the current token.
  * 
  */
 
-char *yyget_text  (void)
+char *gram_get_text  (void)
 {
-        return yytext;
+        return gram_text;
 }
 
 /* %if-reentrant */
 /* %endif */
 
 /** Set the current line number.
- * @param _line_number line number
+ * @param line_number
  * 
  */
-void yyset_lineno (int  _line_number )
+void gram_set_lineno (int  line_number )
 {
     
-    yylineno = _line_number;
+    gram_lineno = line_number;
 }
 
 /** Set the input stream. This does not discard the current
  * input buffer.
- * @param _in_str A readable stream.
+ * @param in_str A readable stream.
  * 
- * @see yy_switch_to_buffer
+ * @see gram__switch_to_buffer
  */
-void yyset_in (FILE *  _in_str )
+void gram_set_in (FILE *  in_str )
 {
-        yyin = _in_str ;
+        gram_in = in_str ;
 }
 
-void yyset_out (FILE *  _out_str )
+void gram_set_out (FILE *  out_str )
 {
-        yyout = _out_str ;
+        gram_out = out_str ;
 }
 
-int yyget_debug  (void)
+int gram_get_debug  (void)
 {
-        return yy_flex_debug;
+        return gram__flex_debug;
 }
 
-void yyset_debug (int  _bdebug )
+void gram_set_debug (int  bdebug )
 {
-        yy_flex_debug = _bdebug ;
+        gram__flex_debug = bdebug ;
 }
 
 /* %endif */
@@ -3922,50 +3880,50 @@ void yyset_debug (int  _bdebug )
 static int yy_init_globals (void)
 {
         /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from yylex_destroy(), so don't allocate here.
+     * This function is called from gram_lex_destroy(), so don't allocate here.
      */
 
-    (yy_buffer_stack) = NULL;
+    (yy_buffer_stack) = 0;
     (yy_buffer_stack_top) = 0;
     (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = NULL;
+    (yy_c_buf_p) = (char *) 0;
     (yy_init) = 0;
     (yy_start) = 0;
 
 /* Defined in main.c */
 #ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
+    gram_in = stdin;
+    gram_out = stdout;
 #else
-    yyin = NULL;
-    yyout = NULL;
+    gram_in = (FILE *) 0;
+    gram_out = (FILE *) 0;
 #endif
 
     /* For future reference: Set errno on error, since we are called by
-     * yylex_init()
+     * gram_lex_init()
      */
     return 0;
 }
 /* %endif */
 
 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy  (void)
+/* gram_lex_destroy is for both reentrant and non-reentrant scanners. */
+int gram_lex_destroy  (void)
 {
     
     /* Pop the buffer stack, destroying each element. */
        while(YY_CURRENT_BUFFER){
-               yy_delete_buffer( YY_CURRENT_BUFFER  );
+               gram__delete_buffer(YY_CURRENT_BUFFER  );
                YY_CURRENT_BUFFER_LVALUE = NULL;
-               yypop_buffer_state();
+               gram_pop_buffer_state();
        }
 
        /* Destroy the stack itself. */
-       yyfree((yy_buffer_stack) );
+       gram_free((yy_buffer_stack) );
        (yy_buffer_stack) = NULL;
 
     /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * yylex() is called, initialization will occur. */
+     * gram_lex() is called, initialization will occur. */
     yy_init_globals( );
 
 /* %if-reentrant */
@@ -3979,19 +3937,18 @@ int yylex_destroy  (void)
  */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 {
-               
-       int i;
+       register int i;
        for ( i = 0; i < n; ++i )
                s1[i] = s2[i];
 }
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s )
+static int yy_flex_strlen (yyconst char * s )
 {
-       int n;
+       register int n;
        for ( n = 0; s[n]; ++n )
                ;
 
@@ -3999,14 +3956,13 @@ static int yy_flex_strlen (const char * s )
 }
 #endif
 
-void *yyalloc (yy_size_t  size )
+void *gram_alloc (yy_size_t  size )
 {
-                       return malloc(size);
+       return (void *) malloc( size );
 }
 
-void *yyrealloc  (void * ptr, yy_size_t  size )
+void *gram_realloc  (void * ptr, yy_size_t  size )
 {
-               
        /* The cast to (char *) in the following accommodates both
         * implementations that use char* generic pointers, and those
         * that use void* generic pointers.  It works with the latter
@@ -4014,12 +3970,12 @@ void *yyrealloc  (void * ptr, yy_size_t  size )
         * any pointer type to void*, and deal with argument conversions
         * as though doing an assignment.
         */
-       return realloc(ptr, size);
+       return (void *) realloc( (char *) ptr, size );
 }
 
-void yyfree (void * ptr )
+void gram_free (void * ptr )
 {
-                       free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
+       free( (char *) ptr );   /* see gram_realloc() for (char *) cast */
 }
 
 /* %if-tables-serialization definitions */
@@ -4029,7 +3985,8 @@ void yyfree (void * ptr )
 
 /* %ok-for-header */
 
-#line 794 "/Users/akim/src/gnu/bison/src/scan-gram.l"
+#line 874 "src/scan-gram.l"
+
 
 
 /* Read bytes from FP into buffer BUF of size SIZE.  Return the
@@ -4256,6 +4213,6 @@ gram_scanner_free (void)
 {
   obstack_free (&obstack_for_string, 0);
   /* Reclaim Flex's buffers.  */
-  yylex_destroy ();
+  gram_lex_destroy ();
 }
 
diff --git a/src/scan-gram.c.patch b/src/scan-gram.c.patch
new file mode 100644 (file)
index 0000000..6870e35
--- /dev/null
@@ -0,0 +1,146 @@
+--- scan-gram.c.orig   2018-06-15 08:25:26.973570952 +1000
++++ scan-gram.c        2018-06-15 08:47:59.977542692 +1000
+@@ -66,6 +66,17 @@
+ /* %endif */
+ /* end standard C headers. */
++char piece_temp[100];
++char *piece[10000];
++int piece0;
++int piece1;
++void insert_piece(int n, const char *str) {
++ memmove(piece + n + 1, piece + n, (piece1 - n) * sizeof(char *));
++ piece[n] = strdup(str);
++ ++piece0;
++ ++piece1;
++}
++
+ /* %if-c-or-c++ */
+ /* flex integer type definitions */
+@@ -253,7 +264,21 @@
+               } \
+       while ( 0 )
++#if 1
++#define flush() \
++ do { \
++  piece_esc(yytext, yy_c_buf_p - yytext); \
++  yytext = yy_c_buf_p; \
++ } while (0)
++#define unput(c) \
++ do { \
++  piece_esc(yytext, yy_c_buf_p - yytext); \
++  yyunput(c, (yytext_ptr)); \
++  yytext = yy_c_buf_p; \
++ } while (0)
++#else
+ #define unput(c) yyunput( c, (yytext_ptr)  )
++#endif
+ #ifndef YY_TYPEDEF_YY_SIZE_T
+ #define YY_TYPEDEF_YY_SIZE_T
+@@ -1395,8 +1420,90 @@
+ /** The main scanner function which does all the work.
+  */
++static int real_yylex(GRAM_STYPE *val, location *loc);
++static void piece_esc(const char *p, size_t n) {
++ size_t i, j = 0;
++ for (i = 0; i < n; ++i)
++  switch (p[i]) {
++  case '<':
++  case '>':
++   j += 4;
++   break;
++  case '&':
++   j += 5;
++   break;
++  default:
++   ++j;
++   break;
++  }
++ char *q = malloc(j + 1);
++ j = 0;
++ for (i = 0; i < n; ++i)
++  switch (p[i]) {
++  case '<':
++   memcpy(q + j, "&lt;", 4);
++   j += 4;
++   break;
++  case '>':
++   memcpy(q + j, "&gt;", 4);
++   j += 4;
++   break;
++  case '&':
++   memcpy(q + j, "&amp;", 5);
++   j += 5;
++   break;
++  default:
++   q[j++] = p[i];
++   break;
++  }
++ q[j] = 0;
++ piece[piece1++] = q;
++}
++static void piece_pack() {
++ int i;
++ size_t j = 0;
++ for (i = piece0; i < piece1; ++i)
++  j += strlen(piece[i]);
++ char *q = malloc(j + 1);
++ j = 0;
++ for (i = piece0; i < piece1; ++i) {
++  int k = strlen(piece[i]);
++  memcpy(q + j, piece[i], k);
++  free(piece[i]);
++  j += k;
++ }
++ q[j] = 0;
++ piece[piece0++] = q;
++ piece1 = piece0;
++}
+ YY_DECL
+ {
++ int result = real_yylex(val, loc);
++ if (result < 0)
++  return ~result;
++ piece_pack();
++#if 0
++ piece[piece1++] = strdup(piece_temp);
++ ++piece0;
++#else
++ size_t n = strlen(yytext);
++ if (n) {
++  sprintf(piece_temp, "<token value=\"%d\">", result);
++  piece[piece1++] = strdup(piece_temp);
++  piece_esc(yytext, n);
++  piece[piece1++] = strdup("</token>");
++  piece_pack();
++ }
++ else {
++  sprintf(piece_temp, "<token value=\"%d\" />", result);
++  piece[piece1++] = strdup(piece_temp);
++  ++piece0;
++ }
++#endif
++ return result;
++}
++static int real_yylex(GRAM_STYPE *val, location *loc)
++{
+       register yy_state_type yy_current_state;
+       register char *yy_cp, *yy_bp;
+       register int yy_act;
+@@ -1475,7 +1582,12 @@
+               gram__load_buffer_state( );
+               }
++#if 1
++ /* we do this so that "continue;" in an action works correctly */
++ for (; ; piece_esc(yytext, yy_c_buf_p - yytext))
++#else
+       while ( 1 )             /* loops until end-of-file is reached */
++#endif
+               {
+ /* %% [8.0] yymore()-related code goes here */
+               yy_cp = (yy_c_buf_p);
index ff5c056..f7e9309 100644 (file)
@@ -172,6 +172,9 @@ eqopt    ([[:space:]]*=)?
       scanner_cursor = loc->start;
       first = false;
     }
+
+  /* Nick */
+  int piece0_save; /* because of lookahead for : after identifer */
 %}
 
 
@@ -285,15 +288,40 @@ eqopt    ([[:space:]]*=)?
     id_loc = *loc;
     bracketed_id_str = NULL;
     BEGIN SC_AFTER_IDENTIFIER;
+ piece_pack();
+ piece0_save = piece0;
+ piece[piece1++] = strdup("<Id>");
+ flush();
+ piece[piece1++] = strdup("</Id>");
   }
 
   {int} {
     val->integer = scan_integer (yytext, 10, *loc);
+#if 1
+ piece_pack();
+ sprintf(piece_temp, "<Int value=\"%d\">", val->integer);
+ piece[piece1++] = strdup(piece_temp);
+ piece[piece1++] = strdup(yytext);
+ piece[piece1++] = strdup("</Int>");
+ piece_pack();
+ return ~INT;
+#else
     return INT;
+#endif
   }
   0[xX][0-9abcdefABCDEF]+ {
     val->integer = scan_integer (yytext, 16, *loc);
+#if 1
+ piece_pack();
+ sprintf(piece_temp, "<Int value=\"%d\">", val->integer);
+ piece[piece1++] = strdup(piece_temp);
+ piece[piece1++] = strdup(yytext);
+ piece[piece1++] = strdup("</Integer>");
+ piece_pack();
+ return ~INT;
+#else
     return INT;
+#endif
   }
 
   /* Identifiers may not start with a digit.  Yet, don't silently
@@ -303,13 +331,13 @@ eqopt    ([[:space:]]*=)?
   }
 
   /* Characters.  */
-  "'"         token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER;
+  "'"         token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER; flush(); piece[piece1++] = strdup("<EscapedCharacter>");
 
   /* Strings. */
-  "\""        token_start = loc->start; BEGIN SC_ESCAPED_STRING;
+  "\""        token_start = loc->start; BEGIN SC_ESCAPED_STRING; flush(); piece[piece1++] = strdup("<EscapedString>");
 
   /* Prologue. */
-  "%{"        code_start = loc->start; BEGIN SC_PROLOGUE;
+  "%{"        code_start = loc->start; BEGIN SC_PROLOGUE; flush(); piece[piece1++] = strdup("<Prologue>");
 
   /* Code in between braces.  */
   "{" {
@@ -317,22 +345,28 @@ eqopt    ([[:space:]]*=)?
     nesting = 0;
     code_start = loc->start;
     BEGIN SC_BRACED_CODE;
+ flush();
+ piece[piece1++] = strdup("<BracedCode>");
   }
 
   /* Semantic predicate. */
   "%?"[ \f\n\t\v]*"{" {
     nesting = 0;
     code_start = loc->start;
+ flush();
+ piece[piece1++] = strdup("<Predicate>");
     BEGIN SC_PREDICATE;
   }
 
   /* A type. */
-  "<*>"       return TAG_ANY;
-  "<>"        return TAG_NONE;
+  "<*>"       piece_pack(); piece[piece1++] = strdup("&lt;<TagAny>*</TagAny>&gt;"); ++piece0; return ~TAG_ANY; /*return TAG_ANY;*/
+  "<>"        piece_pack(); piece[piece1++] = strdup("&lt;<TagNone />&gt;"); ++piece0; return ~TAG_NONE; /*return TAG_NONE;*/
   "<"         {
     nesting = 0;
     token_start = loc->start;
     BEGIN SC_TAG;
+ flush();
+ piece[piece1++] = strdup("<Tag>");
   }
 
   "%%" {
@@ -380,7 +414,7 @@ eqopt    ([[:space:]]*=)?
 <SC_AFTER_IDENTIFIER>
 {
   "[" {
-    if (bracketed_id_str)
+    if (bracketed_id_str) /* SHOULDN'T THIS BE if (!bracketed_id_str) ??? */
       {
         ROLLBACK_CURRENT_TOKEN;
         BEGIN SC_RETURN_BRACKETED_ID;
@@ -397,18 +431,37 @@ eqopt    ([[:space:]]*=)?
   ":" {
     BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
     *loc = id_loc;
+#if 1
+ piece[piece1++] = strdup(yytext);
+ piece0 = piece0_save;
+ piece_pack();
+ return ~ID_COLON;
+#else
     return ID_COLON;
+#endif
   }
   . {
     ROLLBACK_CURRENT_TOKEN;
     BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
     *loc = id_loc;
+#if 1
+ piece0 = piece0_save;
+ piece_pack();
+ return ~ID;
+#else
     return ID;
+#endif
   }
   <<EOF>> {
     BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
     *loc = id_loc;
+#if 1
+ piece0 = piece0_save;
+ piece_pack();
+ return ~ID;
+#else
     return ID;
+#endif
   }
 }
 
@@ -520,6 +573,7 @@ eqopt    ([[:space:]]*=)?
     loc->start = token_start;
     val->code = last_string;
     BEGIN INITIAL;
+ piece[piece1++] = strdup("</EscapedString>");
     return STRING;
   }
   <<EOF>>   unexpected_eof (token_start, "\"");
@@ -550,6 +604,7 @@ eqopt    ([[:space:]]*=)?
                 _("extra characters in character literal"));
     STRING_FREE;
     BEGIN INITIAL;
+ piece[piece1++] = strdup("</EscapedCharacter>");
     return CHAR;
   }
   "\n"      unexpected_newline (token_start, "'");
@@ -573,6 +628,7 @@ eqopt    ([[:space:]]*=)?
         val->uniqstr = uniqstr_new (last_string);
         STRING_FREE;
         BEGIN INITIAL;
+ piece[piece1++] = strdup("</Tag>");
         return TAG;
       }
     STRING_GROW;
@@ -596,7 +652,13 @@ eqopt    ([[:space:]]*=)?
       complain (loc, complaint, _("invalid number after \\-escape: %s"),
                    yytext+1);
     else
+ {
       obstack_1grow (&obstack_for_string, c);
+  sprintf(piece_temp, "<Escape char=\"%d\">", (int)c);
+  piece[piece1++] = strdup(piece_temp);
+  flush();
+  piece[piece1++] = strdup("</Escape>"); 
+ }
   }
 
   \\x[0-9abcdefABCDEF]+ {
@@ -606,27 +668,39 @@ eqopt    ([[:space:]]*=)?
       complain (loc, complaint, _("invalid number after \\-escape: %s"),
                    yytext+1);
     else
+ {
       obstack_1grow (&obstack_for_string, c);
+  sprintf(piece_temp, "<Escape char=\"%d\">", (int)c);
+  piece[piece1++] = strdup(piece_temp);
+  flush();
+  piece[piece1++] = strdup("</Escape>"); 
+ }
   }
 
-  \\a   obstack_1grow (&obstack_for_string, '\a');
-  \\b   obstack_1grow (&obstack_for_string, '\b');
-  \\f   obstack_1grow (&obstack_for_string, '\f');
-  \\n   obstack_1grow (&obstack_for_string, '\n');
-  \\r   obstack_1grow (&obstack_for_string, '\r');
-  \\t   obstack_1grow (&obstack_for_string, '\t');
-  \\v   obstack_1grow (&obstack_for_string, '\v');
+  \\a   obstack_1grow (&obstack_for_string, '\a'); piece[piece1++] = strdup("<Escape char=\"7\">"); flush(); piece[piece1++] = strdup("</Escape>");
+  \\b   obstack_1grow (&obstack_for_string, '\b'); piece[piece1++] = strdup("<Escape char=\"8\">"); flush(); piece[piece1++] = strdup("</Escape>");
+  \\f   obstack_1grow (&obstack_for_string, '\f'); piece[piece1++] = strdup("<Escape char=\"12\">"); flush(); piece[piece1++] = strdup("</Escape>");
+  \\n   obstack_1grow (&obstack_for_string, '\n'); piece[piece1++] = strdup("<Escape char=\"10\">"); flush(); piece[piece1++] = strdup("</Escape>");
+  \\r   obstack_1grow (&obstack_for_string, '\r'); piece[piece1++] = strdup("<Escape char=\"13\">"); flush(); piece[piece1++] = strdup("</Escape>");
+  \\t   obstack_1grow (&obstack_for_string, '\t'); piece[piece1++] = strdup("<Escape char=\"9\">"); flush(); piece[piece1++] = strdup("</Escape>");
+  \\v   obstack_1grow (&obstack_for_string, '\v'); piece[piece1++] = strdup("<Escape char=\"11\">"); flush(); piece[piece1++] = strdup("</Escape>");
 
   /* \\[\"\'?\\] would be shorter, but it confuses xgettext.  */
-  \\("\""|"'"|"?"|"\\")  obstack_1grow (&obstack_for_string, yytext[1]);
-
+  \\("\""|"'"|"?"|"\\")  obstack_1grow (&obstack_for_string, yytext[1]); sprintf(piece_temp, "<Escape char=\"%d\">", yytext[1]); piece[piece1++] = strdup(piece_temp); flush(); piece[piece1++] = strdup("</Escape>"); 
   \\(u|U[0-9abcdefABCDEF]{4})[0-9abcdefABCDEF]{4} {
     int c = convert_ucn_to_byte (yytext);
     if (c <= 0)
       complain (loc, complaint, _("invalid number after \\-escape: %s"),
                    yytext+1);
     else
+ {
       obstack_1grow (&obstack_for_string, c);
+  sprintf(piece_temp, "<Escape char=\"%d\">", c);
+  piece[piece1++] = strdup(piece_temp);
+  flush();
+  piece[piece1++] = strdup("</Escape>"); 
+ }
   }
   \\(.|\n)      {
     char const *p = yytext + 1;
@@ -651,14 +725,14 @@ eqopt    ([[:space:]]*=)?
 
 <SC_CHARACTER>
 {
-  "'"           STRING_GROW; BEGIN context_state;
+  "'"           STRING_GROW; BEGIN context_state; /*piece[piece1++] = strdup("</Character>");*/
   \n            unexpected_newline (token_start, "'");
   <<EOF>>       unexpected_eof (token_start, "'");
 }
 
 <SC_STRING>
 {
-  "\""          STRING_GROW; BEGIN context_state;
+  "\""          STRING_GROW; BEGIN context_state; /*piece[piece1++] = strdup("</String>");*/
   \n            unexpected_newline (token_start, "\"");
   <<EOF>>       unexpected_eof (token_start, "\"");
 }
@@ -674,12 +748,16 @@ eqopt    ([[:space:]]*=)?
     STRING_GROW;
     context_state = YY_START;
     token_start = loc->start;
+ /*flush();
+ piece[piece1++] = strdup("<Character>");*/
     BEGIN SC_CHARACTER;
   }
   "\"" {
     STRING_GROW;
     context_state = YY_START;
     token_start = loc->start;
+ /*flush();
+ piece[piece1++] = strdup("<String>");*/
     BEGIN SC_STRING;
   }
   "/"{splice}"*" {
@@ -726,6 +804,7 @@ eqopt    ([[:space:]]*=)?
         loc->start = code_start;
         val->code = last_string;
         BEGIN INITIAL;
+ piece[piece1++] = strdup("</BracedCode>"); 
         return BRACED_CODE;
       }
   }
@@ -741,6 +820,7 @@ eqopt    ([[:space:]]*=)?
         loc->start = code_start;
         val->code = last_string;
         BEGIN INITIAL;
+ piece[piece1++] = strdup("</Predicate>");
         return BRACED_PREDICATE;
       }
     else
@@ -759,6 +839,7 @@ eqopt    ([[:space:]]*=)?
     loc->start = code_start;
     val->code = last_string;
     BEGIN INITIAL;
+ piece[piece1++] = strdup("</Prologue>");
     return PROLOGUE;
   }
 
index 5a36857..7211b6e 100644 (file)
@@ -1,27 +1,22 @@
-#line 1 "src/scan-skel.c"
+#line 2 "src/scan-skel.c"
 
-#line 3 "src/scan-skel.c"
+#line 4 "src/scan-skel.c"
 
 #define  YY_INT_ALIGNED short int
 
 /* A lexical scanner generated by flex */
 
 /* %not-for-header */
+
 /* %if-c-only */
 /* %if-not-reentrant */
 #define yy_create_buffer skel__create_buffer
 #define yy_delete_buffer skel__delete_buffer
-#define yy_scan_buffer skel__scan_buffer
-#define yy_scan_string skel__scan_string
-#define yy_scan_bytes skel__scan_bytes
+#define yy_flex_debug skel__flex_debug
 #define yy_init_buffer skel__init_buffer
 #define yy_flush_buffer skel__flush_buffer
 #define yy_load_buffer_state skel__load_buffer_state
 #define yy_switch_to_buffer skel__switch_to_buffer
-#define yypush_buffer_state skel_push_buffer_state
-#define yypop_buffer_state skel_pop_buffer_state
-#define yyensure_buffer_stack skel_ensure_buffer_stack
-#define yy_flex_debug skel__flex_debug
 #define yyin skel_in
 #define yyleng skel_leng
 #define yylex skel_lex
@@ -40,8 +35,8 @@
 
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
 /* %endif */
 
 /* %if-c-only */
-#ifdef yy_create_buffer
-#define skel__create_buffer_ALREADY_DEFINED
-#else
-#define yy_create_buffer skel__create_buffer
-#endif
-
-#ifdef yy_delete_buffer
-#define skel__delete_buffer_ALREADY_DEFINED
-#else
-#define yy_delete_buffer skel__delete_buffer
-#endif
-
-#ifdef yy_scan_buffer
-#define skel__scan_buffer_ALREADY_DEFINED
-#else
-#define yy_scan_buffer skel__scan_buffer
-#endif
-
-#ifdef yy_scan_string
-#define skel__scan_string_ALREADY_DEFINED
-#else
-#define yy_scan_string skel__scan_string
-#endif
-
-#ifdef yy_scan_bytes
-#define skel__scan_bytes_ALREADY_DEFINED
-#else
-#define yy_scan_bytes skel__scan_bytes
-#endif
-
-#ifdef yy_init_buffer
-#define skel__init_buffer_ALREADY_DEFINED
-#else
-#define yy_init_buffer skel__init_buffer
-#endif
-
-#ifdef yy_flush_buffer
-#define skel__flush_buffer_ALREADY_DEFINED
-#else
-#define yy_flush_buffer skel__flush_buffer
-#endif
-
-#ifdef yy_load_buffer_state
-#define skel__load_buffer_state_ALREADY_DEFINED
-#else
-#define yy_load_buffer_state skel__load_buffer_state
-#endif
-
-#ifdef yy_switch_to_buffer
-#define skel__switch_to_buffer_ALREADY_DEFINED
-#else
-#define yy_switch_to_buffer skel__switch_to_buffer
-#endif
-
-#ifdef yypush_buffer_state
-#define skel_push_buffer_state_ALREADY_DEFINED
-#else
-#define yypush_buffer_state skel_push_buffer_state
-#endif
-
-#ifdef yypop_buffer_state
-#define skel_pop_buffer_state_ALREADY_DEFINED
-#else
-#define yypop_buffer_state skel_pop_buffer_state
-#endif
-
-#ifdef yyensure_buffer_stack
-#define skel_ensure_buffer_stack_ALREADY_DEFINED
-#else
-#define yyensure_buffer_stack skel_ensure_buffer_stack
-#endif
-
-#ifdef yylex
-#define skel_lex_ALREADY_DEFINED
-#else
-#define yylex skel_lex
-#endif
-
-#ifdef yyrestart
-#define skel_restart_ALREADY_DEFINED
-#else
-#define yyrestart skel_restart
-#endif
-
-#ifdef yylex_init
-#define skel_lex_init_ALREADY_DEFINED
-#else
-#define yylex_init skel_lex_init
-#endif
-
-#ifdef yylex_init_extra
-#define skel_lex_init_extra_ALREADY_DEFINED
-#else
-#define yylex_init_extra skel_lex_init_extra
-#endif
-
-#ifdef yylex_destroy
-#define skel_lex_destroy_ALREADY_DEFINED
-#else
-#define yylex_destroy skel_lex_destroy
-#endif
-
-#ifdef yyget_debug
-#define skel_get_debug_ALREADY_DEFINED
-#else
-#define yyget_debug skel_get_debug
-#endif
-
-#ifdef yyset_debug
-#define skel_set_debug_ALREADY_DEFINED
-#else
-#define yyset_debug skel_set_debug
-#endif
-
-#ifdef yyget_extra
-#define skel_get_extra_ALREADY_DEFINED
-#else
-#define yyget_extra skel_get_extra
-#endif
-
-#ifdef yyset_extra
-#define skel_set_extra_ALREADY_DEFINED
-#else
-#define yyset_extra skel_set_extra
-#endif
-
-#ifdef yyget_in
-#define skel_get_in_ALREADY_DEFINED
-#else
-#define yyget_in skel_get_in
-#endif
-
-#ifdef yyset_in
-#define skel_set_in_ALREADY_DEFINED
-#else
-#define yyset_in skel_set_in
-#endif
-
-#ifdef yyget_out
-#define skel_get_out_ALREADY_DEFINED
-#else
-#define yyget_out skel_get_out
-#endif
-
-#ifdef yyset_out
-#define skel_set_out_ALREADY_DEFINED
-#else
-#define yyset_out skel_set_out
-#endif
-
-#ifdef yyget_leng
-#define skel_get_leng_ALREADY_DEFINED
-#else
-#define yyget_leng skel_get_leng
-#endif
-
-#ifdef yyget_text
-#define skel_get_text_ALREADY_DEFINED
-#else
-#define yyget_text skel_get_text
-#endif
-
-#ifdef yyget_lineno
-#define skel_get_lineno_ALREADY_DEFINED
-#else
-#define yyget_lineno skel_get_lineno
-#endif
-
-#ifdef yyset_lineno
-#define skel_set_lineno_ALREADY_DEFINED
-#else
-#define yyset_lineno skel_set_lineno
-#endif
-
-#ifdef yywrap
-#define skel_wrap_ALREADY_DEFINED
-#else
-#define yywrap skel_wrap
-#endif
-
+    
 /* %endif */
 
-#ifdef yyalloc
-#define skel_alloc_ALREADY_DEFINED
-#else
-#define yyalloc skel_alloc
-#endif
-
-#ifdef yyrealloc
-#define skel_realloc_ALREADY_DEFINED
-#else
-#define yyrealloc skel_realloc
-#endif
-
-#ifdef yyfree
-#define skel_free_ALREADY_DEFINED
-#else
-#define yyfree skel_free
-#endif
-
 /* %if-c-only */
 
-#ifdef yytext
-#define skel_text_ALREADY_DEFINED
-#else
-#define yytext skel_text
-#endif
-
-#ifdef yyleng
-#define skel_leng_ALREADY_DEFINED
-#else
-#define yyleng skel_leng
-#endif
-
-#ifdef yyin
-#define skel_in_ALREADY_DEFINED
-#else
-#define yyin skel_in
-#endif
-
-#ifdef yyout
-#define skel_out_ALREADY_DEFINED
-#else
-#define yyout skel_out
-#endif
-
-#ifdef yy_flex_debug
-#define skel__flex_debug_ALREADY_DEFINED
-#else
-#define yy_flex_debug skel__flex_debug
-#endif
-
-#ifdef yylineno
-#define skel_lineno_ALREADY_DEFINED
-#else
-#define yylineno skel_lineno
-#endif
-
 /* %endif */
 
 /* First, we deal with  platform-specific or compiler-specific issues. */
@@ -365,39 +127,50 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
-#ifndef SIZE_MAX
-#define SIZE_MAX               (~(size_t)0)
-#endif
-
 #endif /* ! C99 */
 
 #endif /* ! FLEXINT_H */
 
 /* %endif */
 
-/* begin standard C++ headers. */
 /* %if-c++-only */
 /* %endif */
 
-/* TODO: this is always defined, so inline it */
-#define yyconst const
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else  /* ! __cplusplus */
 
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define yynoreturn __attribute__((__noreturn__))
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
 #else
-#define yynoreturn
+#define yyconst
 #endif
 
 /* %not-for-header */
+
 /* Returned upon end-of-file. */
 #define YY_NULL 0
 /* %ok-for-header */
 
 /* %not-for-header */
-/* Promotes a possibly negative, possibly signed char to an
- *   integer in range [0..255] for use as an array index.
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
  */
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
 /* %ok-for-header */
 
 /* %if-reentrant */
@@ -412,16 +185,20 @@ typedef unsigned int flex_uint32_t;
  * definition of BEGIN.
  */
 #define BEGIN (yy_start) = 1 + 2 *
+
 /* Translate the current start state into a value that can be later handed
  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  * compatibility.
  */
 #define YY_START (((yy_start) - 1) / 2)
 #define YYSTATE YY_START
+
 /* Action number for EOF rule of a given start state. */
 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
 /* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin  )
+#define YY_NEW_FILE skel_restart(skel_in  )
+
 #define YY_END_OF_BUFFER_CHAR 0
 
 /* Size of default input buffer. */
@@ -446,43 +223,43 @@ typedef unsigned int flex_uint32_t;
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
 /* %if-not-reentrant */
-extern int yyleng;
+extern int skel_leng;
 /* %endif */
 
 /* %if-c-only */
 /* %if-not-reentrant */
-extern FILE *yyin, *yyout;
+extern FILE *skel_in, *skel_out;
 /* %endif */
 /* %endif */
 
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
-    
+
     #define YY_LESS_LINENO(n)
-    #define YY_LINENO_REWIND_TO(ptr)
     
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
        do \
                { \
-               /* Undo effects of setting up yytext. */ \
+               /* Undo effects of setting up skel_text. */ \
         int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
                *yy_cp = (yy_hold_char); \
                YY_RESTORE_YY_MORE_OFFSET \
                (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-               YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+               YY_DO_BEFORE_ACTION; /* set up skel_text again */ \
                } \
        while ( 0 )
+
 #define unput(c) yyunput( c, (yytext_ptr)  )
 
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
 #ifndef YY_STRUCT_YY_BUFFER_STATE
 #define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
@@ -500,7 +277,7 @@ struct yy_buffer_state
        /* Size of input buffer in bytes, not including room for EOB
         * characters.
         */
-       int yy_buf_size;
+       yy_size_t yy_buf_size;
 
        /* Number of characters read into yy_ch_buf, not including EOB
         * characters.
@@ -528,7 +305,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-
+    
        /* Whether to try to fill the input buffer when we reach the
         * end of it.
         */
@@ -545,8 +322,8 @@ struct yy_buffer_state
         * possible backing-up.
         *
         * When we actually see the EOF, we change the status to "new"
-        * (via yyrestart()), so that the user can continue scanning by
-        * just pointing yyin at a new input file.
+        * (via skel_restart()), so that the user can continue scanning by
+        * just pointing skel_in at a new input file.
         */
 #define YY_BUFFER_EOF_PENDING 2
 
@@ -555,12 +332,13 @@ struct yy_buffer_state
 
 /* %if-c-only Standard (non-C++) definition */
 /* %not-for-header */
+
 /* %if-not-reentrant */
 
 /* Stack of input buffers. */
 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
 /* %endif */
 /* %ok-for-header */
 
@@ -575,6 +353,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                           : NULL)
+
 /* Same as previous macro, but useful when we know that the buffer stack is not
  * NULL or when we need an lvalue. For internal use only.
  */
@@ -584,112 +363,115 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
 
 /* %if-not-reentrant */
 /* %not-for-header */
-/* yy_hold_char holds the character lost when yytext is formed. */
+
+/* yy_hold_char holds the character lost when skel_text is formed. */
 static char yy_hold_char;
 static int yy_n_chars;         /* number of characters read into yy_ch_buf */
-int yyleng;
+int skel_leng;
 
 /* Points to current character in buffer. */
-static char *yy_c_buf_p = NULL;
+static char *yy_c_buf_p = (char *) 0;
 static int yy_init = 0;                /* whether we need to initialize */
 static int yy_start = 0;       /* start state number */
 
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
+/* Flag which is used to allow skel_wrap()'s to do buffer switches
+ * instead of setting up a fresh skel_in.  A bit of a hack ...
  */
 static int yy_did_buffer_switch_on_eof;
 /* %ok-for-header */
 
 /* %endif */
 
-void yyrestart ( FILE *input_file  );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
-void yy_delete_buffer ( YY_BUFFER_STATE b  );
-void yy_flush_buffer ( YY_BUFFER_STATE b  );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
-void yypop_buffer_state ( void );
+void skel_restart (FILE *input_file  );
+void skel__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE skel__create_buffer (FILE *file,int size  );
+void skel__delete_buffer (YY_BUFFER_STATE b  );
+void skel__flush_buffer (YY_BUFFER_STATE b  );
+void skel_push_buffer_state (YY_BUFFER_STATE new_buffer  );
+void skel_pop_buffer_state (void );
 
-static void yyensure_buffer_stack ( void );
-static void yy_load_buffer_state ( void );
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+static void skel_ensure_buffer_stack (void );
+static void skel__load_buffer_state (void );
+static void skel__init_buffer (YY_BUFFER_STATE b,FILE *file  );
 
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );
+#define YY_FLUSH_BUFFER skel__flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE skel__scan_buffer (char *base,yy_size_t size  );
+YY_BUFFER_STATE skel__scan_string (yyconst char *yy_str  );
+YY_BUFFER_STATE skel__scan_bytes (yyconst char *bytes,int len  );
 
 /* %endif */
 
-void *yyalloc ( yy_size_t  );
-void *yyrealloc ( void *, yy_size_t  );
-void yyfree ( void *  );
+void *skel_alloc (yy_size_t  );
+void *skel_realloc (void *,yy_size_t  );
+void skel_free (void *  );
+
+#define yy_new_buffer skel__create_buffer
 
-#define yy_new_buffer yy_create_buffer
 #define yy_set_interactive(is_interactive) \
        { \
        if ( ! YY_CURRENT_BUFFER ){ \
-        yyensure_buffer_stack (); \
+        skel_ensure_buffer_stack (); \
                YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer( yyin, YY_BUF_SIZE ); \
+            skel__create_buffer(skel_in,YY_BUF_SIZE ); \
        } \
        YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
        }
+
 #define yy_set_bol(at_bol) \
        { \
        if ( ! YY_CURRENT_BUFFER ){\
-        yyensure_buffer_stack (); \
+        skel_ensure_buffer_stack (); \
                YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer( yyin, YY_BUF_SIZE ); \
+            skel__create_buffer(skel_in,YY_BUF_SIZE ); \
        } \
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
        }
+
 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
-/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
+/* %% [1.0] skel_text/skel_in/skel_out/yy_state_type/skel_lineno etc. def's & init go here */
 /* Begin user sect3 */
 
-#define skel_wrap() (/*CONSTCOND*/1)
+#define skel_wrap(n) 1
 #define YY_SKIP_YYWRAP
 
 #define FLEX_DEBUG
-typedef flex_uint8_t YY_CHAR;
 
-FILE *yyin = NULL, *yyout = NULL;
+typedef unsigned char YY_CHAR;
+
+FILE *skel_in = (FILE *) 0, *skel_out = (FILE *) 0;
 
 typedef int yy_state_type;
 
-extern int yylineno;
-int yylineno = 1;
+extern int skel_lineno;
 
-extern char *yytext;
-#ifdef yytext_ptr
-#undef yytext_ptr
-#endif
-#define yytext_ptr yytext
+int skel_lineno = 1;
 
-/* %% [1.5] DFA */
+extern char *skel_text;
+#define yytext_ptr skel_text
 
 /* %if-c-only Standard (non-C++) definition */
 
-static yy_state_type yy_get_previous_state ( void );
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
-static int yy_get_next_buffer ( void );
-static void yynoreturn yy_fatal_error ( const char* msg  );
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[]  );
 
 /* %endif */
 
 /* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
+ * corresponding action - sets up skel_text.
  */
 #define YY_DO_BEFORE_ACTION \
        (yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
-       yyleng = (int) (yy_cp - yy_bp); \
+/* %% [2.0] code to fiddle skel_text and skel_leng for yymore() goes here \ */\
+       skel_leng = (size_t) (yy_cp - yy_bp); \
        (yy_hold_char) = *yy_cp; \
        *yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
+/* %% [3.0] code to copy yytext_ptr to skel_text[] goes here, if %array \ */\
        (yy_c_buf_p) = yy_cp;
+
 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
 #define YY_NUM_RULES 24
 #define YY_END_OF_BUFFER 25
@@ -700,7 +482,7 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static const flex_int16_t yy_accept[67] =
+static yyconst flex_int16_t yy_accept[67] =
     {   0,
         0,    0,    0,    0,    0,    0,   25,   13,   12,   11,
        14,   21,   23,   22,   22,   13,   11,    5,    4,    1,
@@ -711,7 +493,7 @@ static const flex_int16_t yy_accept[67] =
        10,   11,   11,    8,    9,    0
     } ;
 
-static const YY_CHAR yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
@@ -743,14 +525,14 @@ static const YY_CHAR yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static const YY_CHAR yy_meta[24] =
+static yyconst flex_int32_t yy_meta[24] =
     {   0,
         1,    1,    2,    1,    3,    1,    4,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1
     } ;
 
-static const flex_int16_t yy_base[74] =
+static yyconst flex_int16_t yy_base[74] =
     {   0,
         0,    1,   55,   54,    3,    7,   60,    0,  100,    8,
         0,   29,  100,  100,  100,    0,   50,  100,  100,  100,
@@ -762,7 +544,7 @@ static const flex_int16_t yy_base[74] =
        88,   92,   95
     } ;
 
-static const flex_int16_t yy_def[74] =
+static yyconst flex_int16_t yy_def[74] =
     {   0,
        67,   67,   68,   68,   69,   69,   66,   70,   66,   71,
        72,   73,   66,   66,   66,   70,   71,   66,   66,   66,
@@ -774,7 +556,7 @@ static const flex_int16_t yy_def[74] =
        66,   66,   66
     } ;
 
-static const flex_int16_t yy_nxt[124] =
+static yyconst flex_int16_t yy_nxt[124] =
     {   0,
        66,   66,    9,    9,   14,   15,   10,   10,   14,   15,
        18,   19,   65,   36,   20,   37,   21,   22,   64,   63,
@@ -792,7 +574,7 @@ static const flex_int16_t yy_nxt[124] =
        66,   66,   66
     } ;
 
-static const flex_int16_t yy_chk[124] =
+static yyconst flex_int16_t yy_chk[124] =
     {   0,
         0,    0,    1,    2,    5,    5,    1,    2,    6,    6,
        10,   10,   63,   23,   10,   23,   10,   10,   62,   60,
@@ -813,14 +595,14 @@ static const flex_int16_t yy_chk[124] =
 static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
 
-extern int yy_flex_debug;
-int yy_flex_debug = 1;
+extern int skel__flex_debug;
+int skel__flex_debug = 1;
 
-static const flex_int16_t yy_rule_linenum[24] =
+static yyconst flex_int16_t yy_rule_linenum[24] =
     {   0,
-       73,   74,   75,   76,   77,   79,   80,   82,   83,   84,
-       87,   88,   89,  102,  104,  105,  106,  107,  108,  110,
-      129,  134,  135
+       72,   73,   74,   75,   76,   78,   79,   81,   82,   83,
+       86,   87,   88,  101,  103,  104,  105,  106,  107,  109,
+      128,  133,  134
     } ;
 
 /* The intent behind this definition is that it'll catch
@@ -830,8 +612,8 @@ static const flex_int16_t yy_rule_linenum[24] =
 #define yymore() yymore_used_but_not_detected
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+char *skel_text;
+#line 1 "src/scan-skel.l"
 /* Scan Bison Skeletons.                                       -*- C -*-
 
    Copyright (C) 2001-2015, 2018 Free Software Foundation, Inc.
@@ -851,7 +633,7 @@ char *yytext;
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define YY_NO_INPUT 1
-#line 24 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 24 "src/scan-skel.l"
 /* Work around a bug in flex 2.5.31.  See Debian bug 333231
    <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>.  */
 #undef skel_wrap
@@ -880,9 +662,9 @@ static void at_output (int argc, char *argv[], char **name, int *lineno);
 static void fail_for_at_directive_too_many_args (char const *at_directive_name);
 static void fail_for_at_directive_too_few_args (char const *at_directive_name);
 static void fail_for_invalid_at (char const *at);
-#line 883 "src/scan-skel.c"
 
-#line 885 "src/scan-skel.c"
+
+#line 668 "src/scan-skel.c"
 
 #define INITIAL 0
 #define SC_AT_DIRECTIVE_ARGS 1
@@ -908,7 +690,7 @@ static void fail_for_invalid_at (char const *at);
 /* %if-reentrant */
 /* %if-c-only */
 
-static int yy_init_globals ( void );
+static int yy_init_globals (void );
 
 /* %endif */
 /* %if-reentrant */
@@ -918,31 +700,31 @@ static int yy_init_globals ( void );
 /* Accessor methods to globals.
    These are made visible to non-reentrant scanners for convenience. */
 
-int yylex_destroy ( void );
+int skel_lex_destroy (void );
 
-int yyget_debug ( void );
+int skel_get_debug (void );
 
-void yyset_debug ( int debug_flag  );
+void skel_set_debug (int debug_flag  );
 
-YY_EXTRA_TYPE yyget_extra ( void );
+YY_EXTRA_TYPE skel_get_extra (void );
 
-void yyset_extra ( YY_EXTRA_TYPE user_defined  );
+void skel_set_extra (YY_EXTRA_TYPE user_defined  );
 
-FILE *yyget_in ( void );
+FILE *skel_get_in (void );
 
-void yyset_in  ( FILE * _in_str  );
+void skel_set_in  (FILE * in_str  );
 
-FILE *yyget_out ( void );
+FILE *skel_get_out (void );
 
-void yyset_out  ( FILE * _out_str  );
+void skel_set_out  (FILE * out_str  );
 
-                       int yyget_leng ( void );
+int skel_get_leng (void );
 
-char *yyget_text ( void );
+char *skel_get_text (void );
 
-int yyget_lineno ( void );
+int skel_get_lineno (void );
 
-void yyset_lineno ( int _line_number  );
+void skel_set_lineno (int line_number  );
 
 /* %if-bison-bridge */
 /* %endif */
@@ -953,35 +735,34 @@ void yyset_lineno ( int _line_number  );
 
 #ifndef YY_SKIP_YYWRAP
 #ifdef __cplusplus
-extern "C" int yywrap ( void );
+extern "C" int skel_wrap (void );
 #else
-extern int yywrap ( void );
+extern int skel_wrap (void );
 #endif
 #endif
 
 /* %not-for-header */
-#ifndef YY_NO_UNPUT
-    
-#endif
+
 /* %ok-for-header */
 
 /* %endif */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int );
+static void yy_flex_strncpy (char *,yyconst char *,int );
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * );
+static int yy_flex_strlen (yyconst char * );
 #endif
 
 #ifndef YY_NO_INPUT
 /* %if-c-only Standard (non-C++) definition */
 /* %not-for-header */
+
 #ifdef __cplusplus
-static int yyinput ( void );
+static int yyinput (void );
 #else
-static int input ( void );
+static int input (void );
 #endif
 /* %ok-for-header */
 
@@ -1008,7 +789,7 @@ static int input ( void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( skel_text, skel_leng, 1, skel_out )) {} } while (0)
 /* %endif */
 /* %if-c++-only C++ definition */
 /* %endif */
@@ -1023,20 +804,20 @@ static int input ( void );
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               int n; \
+               size_t n; \
                for ( n = 0; n < max_size && \
-                            (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+                            (c = getc( skel_in )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
                if ( c == '\n' ) \
                        buf[n++] = (char) c; \
-               if ( c == EOF && ferror( yyin ) ) \
+               if ( c == EOF && ferror( skel_in ) ) \
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
                result = n; \
                } \
        else \
                { \
                errno=0; \
-               while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+               while ( (result = fread(buf, 1, max_size, skel_in))==0 && ferror(skel_in)) \
                        { \
                        if( errno != EINTR) \
                                { \
@@ -1044,7 +825,7 @@ static int input ( void );
                                break; \
                                } \
                        errno=0; \
-                       clearerr(yyin); \
+                       clearerr(skel_in); \
                        } \
                }\
 \
@@ -1077,9 +858,11 @@ static int input ( void );
 
 /* %if-tables-serialization structures and prototypes */
 /* %not-for-header */
+
 /* %ok-for-header */
 
 /* %not-for-header */
+
 /* %tables-yydmap generated elements */
 /* %endif */
 /* end tables serialization structures and prototypes */
@@ -1093,15 +876,15 @@ static int input ( void );
 #define YY_DECL_IS_OURS 1
 /* %if-c-only Standard (non-C++) definition */
 
-extern int yylex (void);
+extern int skel_lex (void);
 
-#define YY_DECL int yylex (void)
+#define YY_DECL int skel_lex (void)
 /* %endif */
 /* %if-c++-only C++ definition */
 /* %endif */
 #endif /* !YY_DECL */
 
-/* Code executed at the beginning of each rule, after yytext and yyleng
+/* Code executed at the beginning of each rule, after skel_text and skel_leng
  * have been set up.
  */
 #ifndef YY_USER_ACTION
@@ -1110,7 +893,7 @@ extern int yylex (void);
 
 /* Code executed at the end of each rule. */
 #ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
+#define YY_BREAK break;
 #endif
 
 /* %% [6.0] YY_RULE_SETUP definition goes here */
@@ -1118,14 +901,34 @@ extern int yylex (void);
        YY_USER_ACTION
 
 /* %not-for-header */
+
 /** The main scanner function which does all the work.
  */
 YY_DECL
 {
-       yy_state_type yy_current_state;
-       char *yy_cp, *yy_bp;
-       int yy_act;
+       register yy_state_type yy_current_state;
+       register char *yy_cp, *yy_bp;
+       register int yy_act;
     
+/* %% [7.0] user's declarations go here */
+#line 57 "src/scan-skel.l"
+
+
+
+  int out_lineno PACIFY_CC (= 0);
+  char *out_name = NULL;
+
+  /* Currently, only the @complain directive takes multiple arguments, and
+     never more than 7, with argv[0] being the directive name and argv[1]
+     being the type of complaint to dispatch. */
+#define ARGC_MAX 9
+  int argc = 0;
+  char *argv[ARGC_MAX];
+  at_directive at_ptr = NULL;
+
+
+#line 931 "src/scan-skel.c"
+
        if ( !(yy_init) )
                {
                (yy_init) = 1;
@@ -1137,56 +940,35 @@ YY_DECL
                if ( ! (yy_start) )
                        (yy_start) = 1; /* first start state */
 
-               if ( ! yyin )
+               if ( ! skel_in )
 /* %if-c-only */
-                       yyin = stdin;
+                       skel_in = stdin;
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 
-               if ( ! yyout )
+               if ( ! skel_out )
 /* %if-c-only */
-                       yyout = stdout;
+                       skel_out = stdout;
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 
                if ( ! YY_CURRENT_BUFFER ) {
-                       yyensure_buffer_stack ();
+                       skel_ensure_buffer_stack ();
                        YY_CURRENT_BUFFER_LVALUE =
-                               yy_create_buffer( yyin, YY_BUF_SIZE );
+                               skel__create_buffer(skel_in,YY_BUF_SIZE );
                }
 
-               yy_load_buffer_state(  );
+               skel__load_buffer_state( );
                }
 
-       {
-/* %% [7.0] user's declarations go here */
-#line 57 "/Users/akim/src/gnu/bison/src/scan-skel.l"
-
-
-
-#line 61 "/Users/akim/src/gnu/bison/src/scan-skel.l"
-  int out_lineno PACIFY_CC (= 0);
-  char *out_name = NULL;
-
-  /* Currently, only the @complain directive takes multiple arguments, and
-     never more than 7, with argv[0] being the directive name and argv[1]
-     being the type of complaint to dispatch. */
-#define ARGC_MAX 9
-  int argc = 0;
-  char *argv[ARGC_MAX];
-  at_directive at_ptr = NULL;
-
-
-#line 1182 "src/scan-skel.c"
-
-       while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
+       while ( 1 )             /* loops until end-of-file is reached */
                {
 /* %% [8.0] yymore()-related code goes here */
                yy_cp = (yy_c_buf_p);
 
-               /* Support of yytext. */
+               /* Support of skel_text. */
                *yy_cp = (yy_hold_char);
 
                /* yy_bp points to the position in yy_ch_buf of the start of
@@ -1199,7 +981,7 @@ YY_DECL
 yy_match:
                do
                        {
-                       YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+                       register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
                        if ( yy_accept[yy_current_state] )
                                {
                                (yy_last_accepting_state) = yy_current_state;
@@ -1209,9 +991,9 @@ yy_match:
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
                                if ( yy_current_state >= 67 )
-                                       yy_c = yy_meta[yy_c];
+                                       yy_c = yy_meta[(unsigned int) yy_c];
                                }
-                       yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+                       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
                while ( yy_current_state != 66 );
@@ -1224,21 +1006,21 @@ yy_find_action:
 
                YY_DO_BEFORE_ACTION;
 
-/* %% [11.0] code for yylineno update goes here */
+/* %% [11.0] code for skel_lineno update goes here */
 
 do_action:     /* This label is used only to access EOF actions. */
 
 /* %% [12.0] debug code goes here */
-               if ( yy_flex_debug )
+               if ( skel__flex_debug )
                        {
                        if ( yy_act == 0 )
                                fprintf( stderr, "--scanner backing up\n" );
                        else if ( yy_act < 24 )
                                fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
-                                        (long)yy_rule_linenum[yy_act], yytext );
+                                        (long)yy_rule_linenum[yy_act], skel_text );
                        else if ( yy_act == 24 )
                                fprintf( stderr, "--accepting default rule (\"%s\")\n",
-                                        yytext );
+                                        skel_text );
                        else if ( yy_act == 25 )
                                fprintf( stderr, "--(end of buffer or a NUL)\n" );
                        else
@@ -1257,79 +1039,79 @@ do_action:      /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 73 "/Users/akim/src/gnu/bison/src/scan-skel.l"
-fputc ('@', yyout);
+#line 72 "src/scan-skel.l"
+fputc ('@', skel_out);
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 74 "/Users/akim/src/gnu/bison/src/scan-skel.l"
-fputc ('[', yyout);
+#line 73 "src/scan-skel.l"
+fputc ('[', skel_out);
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 75 "/Users/akim/src/gnu/bison/src/scan-skel.l"
-fputc (']', yyout);
+#line 74 "src/scan-skel.l"
+fputc (']', skel_out);
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 76 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 75 "src/scan-skel.l"
 continue;  /* Used by b4_cat in ../data/bison.m4.  */
        YY_BREAK
 case 5:
 /* rule 5 can match eol */
 YY_RULE_SETUP
-#line 77 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 76 "src/scan-skel.l"
 continue;
        YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 79 "/Users/akim/src/gnu/bison/src/scan-skel.l"
-fprintf (yyout, "%d", out_lineno + 1);
+#line 78 "src/scan-skel.l"
+fprintf (skel_out, "%d", out_lineno + 1);
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 80 "/Users/akim/src/gnu/bison/src/scan-skel.l"
-fputs (quotearg_style (c_quoting_style, out_name), yyout);
+#line 79 "src/scan-skel.l"
+fputs (quotearg_style (c_quoting_style, out_name), skel_out);
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 82 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 81 "src/scan-skel.l"
 at_init (&argc, argv, &at_ptr, &at_basename);
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 83 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 82 "src/scan-skel.l"
 at_init (&argc, argv, &at_ptr, &at_complain);
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 84 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 83 "src/scan-skel.l"
 at_init (&argc, argv, &at_ptr, &at_output);
        YY_BREAK
 /* This pattern must not match more than the previous @ patterns. */
 case 11:
 YY_RULE_SETUP
-#line 87 "/Users/akim/src/gnu/bison/src/scan-skel.l"
-fail_for_invalid_at (yytext);
+#line 86 "src/scan-skel.l"
+fail_for_invalid_at (skel_text);
        YY_BREAK
 case 12:
 /* rule 12 can match eol */
 YY_RULE_SETUP
-#line 88 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 87 "src/scan-skel.l"
 out_lineno++; ECHO;
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 89 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 88 "src/scan-skel.l"
 ECHO;
        YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 91 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 90 "src/scan-skel.l"
 {
   if (out_name)
     {
       free (out_name);
-      xfclose (yyout);
+      xfclose (skel_out);
     }
   return EOF;
 }
@@ -1339,38 +1121,38 @@ case YY_STATE_EOF(INITIAL):
 case 14:
 /* rule 14 can match eol */
 YY_RULE_SETUP
-#line 102 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 101 "src/scan-skel.l"
 STRING_GROW;
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 104 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 103 "src/scan-skel.l"
 obstack_1grow (&obstack_for_string, '@');
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 105 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 104 "src/scan-skel.l"
 obstack_1grow (&obstack_for_string, '[');
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 106 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 105 "src/scan-skel.l"
 obstack_1grow (&obstack_for_string, ']');
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 107 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 106 "src/scan-skel.l"
 continue; /* For starting an argument that begins with whitespace. */
        YY_BREAK
 case 19:
 /* rule 19 can match eol */
 YY_RULE_SETUP
-#line 108 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 107 "src/scan-skel.l"
 continue;
        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 110 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 109 "src/scan-skel.l"
 {
     if (argc >= ARGC_MAX)
       fail_for_at_directive_too_many_args (argv[0]);
@@ -1378,7 +1160,7 @@ YY_RULE_SETUP
     argv[argc++] = obstack_finish0 (&obstack_for_string);
 
     /* Like M4, skip whitespace after a comma.  */
-    if (yytext[1] == ',')
+    if (skel_text[1] == ',')
       BEGIN SC_AT_DIRECTIVE_SKIP_WS;
     else
       {
@@ -1392,8 +1174,8 @@ YY_RULE_SETUP
        YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 129 "/Users/akim/src/gnu/bison/src/scan-skel.l"
-fail_for_invalid_at (yytext);
+#line 128 "src/scan-skel.l"
+fail_for_invalid_at (skel_text);
        YY_BREAK
 
 
@@ -1401,12 +1183,12 @@ fail_for_invalid_at (yytext);
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 134 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 133 "src/scan-skel.l"
 continue;
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 135 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 134 "src/scan-skel.l"
 yyless (0); BEGIN SC_AT_DIRECTIVE_ARGS;
        YY_BREAK
 
@@ -1414,16 +1196,16 @@ yyless (0); BEGIN SC_AT_DIRECTIVE_ARGS;
 
 case YY_STATE_EOF(SC_AT_DIRECTIVE_ARGS):
 case YY_STATE_EOF(SC_AT_DIRECTIVE_SKIP_WS):
-#line 140 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 139 "src/scan-skel.l"
 complain (NULL, fatal, _("unclosed %s directive in skeleton"), argv[0]);
        YY_BREAK
 
 case 24:
 YY_RULE_SETUP
-#line 143 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 142 "src/scan-skel.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
        YY_BREAK
-#line 1426 "src/scan-skel.c"
+#line 1209 "src/scan-skel.c"
 
        case YY_END_OF_BUFFER:
                {
@@ -1438,19 +1220,15 @@ YY_FATAL_ERROR( "flex scanner jammed" );
                        {
                        /* We're scanning a new file or input source.  It's
                         * possible that this happened because the user
-                        * just pointed yyin at a new source and called
-                        * yylex().  If so, then we have to assure
+                        * just pointed skel_in at a new source and called
+                        * skel_lex().  If so, then we have to assure
                         * consistency between YY_CURRENT_BUFFER and our
                         * globals.  Here is the right place to do so, because
                         * this is the first action (other than possibly a
                         * back-up) that will match for the new input source.
                         */
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-/* %if-c-only */
-                       YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+                       YY_CURRENT_BUFFER_LVALUE->yy_input_file = skel_in;
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
                        }
 
@@ -1505,11 +1283,11 @@ YY_FATAL_ERROR( "flex scanner jammed" );
                                {
                                (yy_did_buffer_switch_on_eof) = 0;
 
-                               if ( yywrap(  ) )
+                               if ( skel_wrap( ) )
                                        {
                                        /* Note: because we've taken care in
                                         * yy_get_next_buffer() to have set up
-                                        * yytext, we can now set up
+                                        * skel_text, we can now set up
                                         * yy_c_buf_p so that if some total
                                         * hoser (like flex itself) wants to
                                         * call the scanner after we return the
@@ -1558,12 +1336,12 @@ YY_FATAL_ERROR( "flex scanner jammed" );
                        "fatal flex scanner internal error--no action found" );
        } /* end of action switch */
                } /* end of scanning one token */
-       } /* end of user's declarations */
-} /* end of yylex */
+} /* end of skel_lex */
 /* %ok-for-header */
 
 /* %if-c++-only */
 /* %not-for-header */
+
 /* %ok-for-header */
 
 /* %endif */
@@ -1581,9 +1359,9 @@ static int yy_get_next_buffer (void)
 /* %if-c++-only */
 /* %endif */
 {
-       char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-       char *source = (yytext_ptr);
-       int number_to_move, i;
+       register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+       register char *source = (yytext_ptr);
+       register int number_to_move, i;
        int ret_val;
 
        if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -1612,7 +1390,7 @@ static int yy_get_next_buffer (void)
        /* Try to read more data. */
 
        /* First move last chars to start of buffer. */
-       number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+       number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
 
        for ( i = 0; i < number_to_move; ++i )
                *(dest++) = *(source++);
@@ -1632,7 +1410,7 @@ static int yy_get_next_buffer (void)
                        { /* Not enough room in the buffer - grow it. */
 
                        /* just a shorter name for the current buffer */
-                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
 
                        int yy_c_buf_p_offset =
                                (int) ((yy_c_buf_p) - b->yy_ch_buf);
@@ -1648,12 +1426,11 @@ static int yy_get_next_buffer (void)
 
                                b->yy_ch_buf = (char *)
                                        /* Include room in for 2 EOB chars. */
-                                       yyrealloc( (void *) b->yy_ch_buf,
-                                                        (yy_size_t) (b->yy_buf_size + 2)  );
+                                       skel_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
                                }
                        else
                                /* Can't grow it, we don't own it. */
-                               b->yy_ch_buf = NULL;
+                               b->yy_ch_buf = 0;
 
                        if ( ! b->yy_ch_buf )
                                YY_FATAL_ERROR(
@@ -1671,7 +1448,7 @@ static int yy_get_next_buffer (void)
 
                /* Read in more data. */
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-                       (yy_n_chars), num_to_read );
+                       (yy_n_chars), (size_t) num_to_read );
 
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
                }
@@ -1681,7 +1458,7 @@ static int yy_get_next_buffer (void)
                if ( number_to_move == YY_MORE_ADJ )
                        {
                        ret_val = EOB_ACT_END_OF_FILE;
-                       yyrestart( yyin  );
+                       skel_restart(skel_in  );
                        }
 
                else
@@ -1695,15 +1472,12 @@ static int yy_get_next_buffer (void)
        else
                ret_val = EOB_ACT_CONTINUE_SCAN;
 
-       if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+       if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
                /* Extend the array by 50%, plus the number we really need. */
-               int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
-                       (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
+               yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) skel_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
                if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
                        YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-               /* "- 2" to take care of EOB's */
-               YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
        }
 
        (yy_n_chars) += number_to_move;
@@ -1719,13 +1493,14 @@ static int yy_get_next_buffer (void)
 
 /* %if-c-only */
 /* %not-for-header */
+
     static yy_state_type yy_get_previous_state (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
-       yy_state_type yy_current_state;
-       char *yy_cp;
+       register yy_state_type yy_current_state;
+       register char *yy_cp;
     
 /* %% [15.0] code to get the start state into yy_current_state goes here */
        yy_current_state = (yy_start);
@@ -1733,7 +1508,7 @@ static int yy_get_next_buffer (void)
        for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
                {
 /* %% [16.0] code to find the next state goes here */
-               YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+               register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
                if ( yy_accept[yy_current_state] )
                        {
                        (yy_last_accepting_state) = yy_current_state;
@@ -1743,9 +1518,9 @@ static int yy_get_next_buffer (void)
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
                        if ( yy_current_state >= 67 )
-                               yy_c = yy_meta[yy_c];
+                               yy_c = yy_meta[(unsigned int) yy_c];
                        }
-               yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+               yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                }
 
        return yy_current_state;
@@ -1762,11 +1537,11 @@ static int yy_get_next_buffer (void)
 /* %if-c++-only */
 /* %endif */
 {
-       int yy_is_jam;
+       register int yy_is_jam;
     /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
-       char *yy_cp = (yy_c_buf_p);
+       register char *yy_cp = (yy_c_buf_p);
 
-       YY_CHAR yy_c = 1;
+       register YY_CHAR yy_c = 1;
        if ( yy_accept[yy_current_state] )
                {
                (yy_last_accepting_state) = yy_current_state;
@@ -1776,19 +1551,17 @@ static int yy_get_next_buffer (void)
                {
                yy_current_state = (int) yy_def[yy_current_state];
                if ( yy_current_state >= 67 )
-                       yy_c = yy_meta[yy_c];
+                       yy_c = yy_meta[(unsigned int) yy_c];
                }
-       yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
        yy_is_jam = (yy_current_state == 66);
 
-               return yy_is_jam ? 0 : yy_current_state;
+       return yy_is_jam ? 0 : yy_current_state;
 }
 
-#ifndef YY_NO_UNPUT
 /* %if-c-only */
 
 /* %endif */
-#endif
 
 /* %if-c-only */
 #ifndef YY_NO_INPUT
@@ -1818,7 +1591,7 @@ static int yy_get_next_buffer (void)
 
                else
                        { /* need more input */
-                       int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+                       int offset = (yy_c_buf_p) - (yytext_ptr);
                        ++(yy_c_buf_p);
 
                        switch ( yy_get_next_buffer(  ) )
@@ -1835,14 +1608,14 @@ static int yy_get_next_buffer (void)
                                         */
 
                                        /* Reset buffer status. */
-                                       yyrestart( yyin );
+                                       skel_restart(skel_in );
 
                                        /*FALLTHROUGH*/
 
                                case EOB_ACT_END_OF_FILE:
                                        {
-                                       if ( yywrap(  ) )
-                                               return 0;
+                                       if ( skel_wrap( ) )
+                                               return EOF;
 
                                        if ( ! (yy_did_buffer_switch_on_eof) )
                                                YY_NEW_FILE;
@@ -1861,10 +1634,10 @@ static int yy_get_next_buffer (void)
                }
 
        c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
-       *(yy_c_buf_p) = '\0';   /* preserve yytext */
+       *(yy_c_buf_p) = '\0';   /* preserve skel_text */
        (yy_hold_char) = *++(yy_c_buf_p);
 
-/* %% [19.0] update BOL and yylineno */
+/* %% [19.0] update BOL and skel_lineno */
 
        return c;
 }
@@ -1878,31 +1651,28 @@ static int yy_get_next_buffer (void)
  * @note This function does not reset the start condition to @c INITIAL .
  */
 /* %if-c-only */
-    void yyrestart  (FILE * input_file )
+    void skel_restart  (FILE * input_file )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
     
        if ( ! YY_CURRENT_BUFFER ){
-        yyensure_buffer_stack ();
+        skel_ensure_buffer_stack ();
                YY_CURRENT_BUFFER_LVALUE =
-            yy_create_buffer( yyin, YY_BUF_SIZE );
+            skel__create_buffer(skel_in,YY_BUF_SIZE );
        }
 
-       yy_init_buffer( YY_CURRENT_BUFFER, input_file );
-       yy_load_buffer_state(  );
+       skel__init_buffer(YY_CURRENT_BUFFER,input_file );
+       skel__load_buffer_state( );
 }
 
-/* %if-c++-only */
-/* %endif */
-
 /** Switch to a different input buffer.
  * @param new_buffer The new input buffer.
  * 
  */
 /* %if-c-only */
-    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+    void skel__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -1910,10 +1680,10 @@ static int yy_get_next_buffer (void)
     
        /* TODO. We should be able to replace this entire function body
         * with
-        *              yypop_buffer_state();
-        *              yypush_buffer_state(new_buffer);
+        *              skel_pop_buffer_state();
+        *              skel_push_buffer_state(new_buffer);
      */
-       yyensure_buffer_stack ();
+       skel_ensure_buffer_stack ();
        if ( YY_CURRENT_BUFFER == new_buffer )
                return;
 
@@ -1926,29 +1696,25 @@ static int yy_get_next_buffer (void)
                }
 
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
-       yy_load_buffer_state(  );
+       skel__load_buffer_state( );
 
        /* We don't actually know whether we did this switch during
-        * EOF (yywrap()) processing, but the only time this flag
-        * is looked at is after yywrap() is called, so it's safe
+        * EOF (skel_wrap()) processing, but the only time this flag
+        * is looked at is after skel_wrap() is called, so it's safe
         * to go ahead and always set it.
         */
        (yy_did_buffer_switch_on_eof) = 1;
 }
 
 /* %if-c-only */
-static void yy_load_buffer_state  (void)
+static void skel__load_buffer_state  (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
        (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-/* %if-c-only */
-       yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+       skel_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
        (yy_hold_char) = *(yy_c_buf_p);
 }
 
@@ -1959,42 +1725,39 @@ static void yy_load_buffer_state  (void)
  * @return the allocated buffer state.
  */
 /* %if-c-only */
-    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
+    YY_BUFFER_STATE skel__create_buffer  (FILE * file, int  size )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
        YY_BUFFER_STATE b;
     
-       b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
+       b = (YY_BUFFER_STATE) skel_alloc(sizeof( struct yy_buffer_state )  );
        if ( ! b )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+               YY_FATAL_ERROR( "out of dynamic memory in skel__create_buffer()" );
 
        b->yy_buf_size = size;
 
        /* yy_ch_buf has to be 2 characters longer than the size given because
         * we need to put in 2 end-of-buffer characters.
         */
-       b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
+       b->yy_ch_buf = (char *) skel_alloc(b->yy_buf_size + 2  );
        if ( ! b->yy_ch_buf )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+               YY_FATAL_ERROR( "out of dynamic memory in skel__create_buffer()" );
 
        b->yy_is_our_buffer = 1;
 
-       yy_init_buffer( b, file );
+       skel__init_buffer(b,file );
 
        return b;
 }
 
-/* %if-c++-only */
-/* %endif */
-
 /** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with skel__create_buffer()
  * 
  */
 /* %if-c-only */
-    void yy_delete_buffer (YY_BUFFER_STATE  b )
+    void skel__delete_buffer (YY_BUFFER_STATE  b )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2007,17 +1770,24 @@ static void yy_load_buffer_state  (void)
                YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
 
        if ( b->yy_is_our_buffer )
-               yyfree( (void *) b->yy_ch_buf  );
+               skel_free((void *) b->yy_ch_buf  );
 
-       yyfree( (void *) b  );
+       skel_free((void *) b  );
 }
 
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
+ * such as during a skel_restart() or at EOF.
  */
 /* %if-c-only */
-    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+    static void skel__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2025,17 +1795,13 @@ static void yy_load_buffer_state  (void)
 {
        int oerrno = errno;
     
-       yy_flush_buffer( b );
+       skel__flush_buffer(b );
 
-/* %if-c-only */
        b->yy_input_file = file;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
        b->yy_fill_buffer = 1;
 
-    /* If b is the current buffer, then yy_init_buffer was _probably_
-     * called from yyrestart() or through yy_get_next_buffer.
+    /* If b is the current buffer, then skel__init_buffer was _probably_
+     * called from skel_restart() or through yy_get_next_buffer.
      * In that case, we don't want to reset the lineno or column.
      */
     if (b != YY_CURRENT_BUFFER){
@@ -2058,7 +1824,7 @@ static void yy_load_buffer_state  (void)
  * 
  */
 /* %if-c-only */
-    void yy_flush_buffer (YY_BUFFER_STATE  b )
+    void skel__flush_buffer (YY_BUFFER_STATE  b )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2081,7 +1847,7 @@ static void yy_load_buffer_state  (void)
        b->yy_buffer_status = YY_BUFFER_NEW;
 
        if ( b == YY_CURRENT_BUFFER )
-               yy_load_buffer_state(  );
+               skel__load_buffer_state( );
 }
 
 /* %if-c-or-c++ */
@@ -2092,7 +1858,7 @@ static void yy_load_buffer_state  (void)
  *  
  */
 /* %if-c-only */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void skel_push_buffer_state (YY_BUFFER_STATE new_buffer )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2100,9 +1866,9 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
        if (new_buffer == NULL)
                return;
 
-       yyensure_buffer_stack();
+       skel_ensure_buffer_stack();
 
-       /* This block is copied from yy_switch_to_buffer. */
+       /* This block is copied from skel__switch_to_buffer. */
        if ( YY_CURRENT_BUFFER )
                {
                /* Flush out information for old buffer. */
@@ -2116,8 +1882,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
                (yy_buffer_stack_top)++;
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
-       /* copied from yy_switch_to_buffer. */
-       yy_load_buffer_state(  );
+       /* copied from skel__switch_to_buffer. */
+       skel__load_buffer_state( );
        (yy_did_buffer_switch_on_eof) = 1;
 }
 /* %endif */
@@ -2128,7 +1894,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
  *  
  */
 /* %if-c-only */
-void yypop_buffer_state (void)
+void skel_pop_buffer_state (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
@@ -2136,13 +1902,13 @@ void yypop_buffer_state (void)
        if (!YY_CURRENT_BUFFER)
                return;
 
-       yy_delete_buffer(YY_CURRENT_BUFFER );
+       skel__delete_buffer(YY_CURRENT_BUFFER );
        YY_CURRENT_BUFFER_LVALUE = NULL;
        if ((yy_buffer_stack_top) > 0)
                --(yy_buffer_stack_top);
 
        if (YY_CURRENT_BUFFER) {
-               yy_load_buffer_state(  );
+               skel__load_buffer_state( );
                (yy_did_buffer_switch_on_eof) = 1;
        }
 }
@@ -2153,12 +1919,12 @@ void yypop_buffer_state (void)
  *  Guarantees space for at least one push.
  */
 /* %if-c-only */
-static void yyensure_buffer_stack (void)
+static void skel_ensure_buffer_stack (void)
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
-       yy_size_t num_to_alloc;
+       int num_to_alloc;
     
        if (!(yy_buffer_stack)) {
 
@@ -2166,15 +1932,15 @@ static void yyensure_buffer_stack (void)
                 * scanner will even need a stack. We use 2 instead of 1 to avoid an
                 * immediate realloc on the next call.
          */
-      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
-               (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+               num_to_alloc = 1;
+               (yy_buffer_stack) = (struct yy_buffer_state**)skel_alloc
                                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
                                                                );
                if ( ! (yy_buffer_stack) )
-                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+                       YY_FATAL_ERROR( "out of dynamic memory in skel_ensure_buffer_stack()" );
+                                                                 
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+                               
                (yy_buffer_stack_max) = num_to_alloc;
                (yy_buffer_stack_top) = 0;
                return;
@@ -2183,15 +1949,15 @@ static void yyensure_buffer_stack (void)
        if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 
                /* Increase the buffer to prepare for a possible push. */
-               yy_size_t grow_size = 8 /* arbitrary grow size */;
+               int grow_size = 8 /* arbitrary grow size */;
 
                num_to_alloc = (yy_buffer_stack_max) + grow_size;
-               (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+               (yy_buffer_stack) = (struct yy_buffer_state**)skel_realloc
                                                                ((yy_buffer_stack),
                                                                num_to_alloc * sizeof(struct yy_buffer_state*)
                                                                );
                if ( ! (yy_buffer_stack) )
-                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+                       YY_FATAL_ERROR( "out of dynamic memory in skel_ensure_buffer_stack()" );
 
                /* zero only the new slots.*/
                memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2205,9 +1971,9 @@ static void yyensure_buffer_stack (void)
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
  * 
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object. 
  */
-YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
+YY_BUFFER_STATE skel__scan_buffer  (char * base, yy_size_t  size )
 {
        YY_BUFFER_STATE b;
     
@@ -2215,53 +1981,53 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
             base[size-1] != YY_END_OF_BUFFER_CHAR )
                /* They forgot to leave room for the EOB's. */
-               return NULL;
+               return 0;
 
-       b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
+       b = (YY_BUFFER_STATE) skel_alloc(sizeof( struct yy_buffer_state )  );
        if ( ! b )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+               YY_FATAL_ERROR( "out of dynamic memory in skel__scan_buffer()" );
 
-       b->yy_buf_size = (int) (size - 2);      /* "- 2" to take care of EOB's */
+       b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
        b->yy_buf_pos = b->yy_ch_buf = base;
        b->yy_is_our_buffer = 0;
-       b->yy_input_file = NULL;
+       b->yy_input_file = 0;
        b->yy_n_chars = b->yy_buf_size;
        b->yy_is_interactive = 0;
        b->yy_at_bol = 1;
        b->yy_fill_buffer = 0;
        b->yy_buffer_status = YY_BUFFER_NEW;
 
-       yy_switch_to_buffer( b  );
+       skel__switch_to_buffer(b  );
 
        return b;
 }
 /* %endif */
 
 /* %if-c-only */
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to skel_lex() will
  * scan from a @e copy of @a str.
  * @param yystr a NUL-terminated string to scan
  * 
  * @return the newly allocated buffer state object.
  * @note If you want to scan bytes that may contain NUL values, then use
- *       yy_scan_bytes() instead.
+ *       skel__scan_bytes() instead.
  */
-YY_BUFFER_STATE yy_scan_string (const char * yystr )
+YY_BUFFER_STATE skel__scan_string (yyconst char * yystr )
 {
     
-       return yy_scan_bytes( yystr, (int) strlen(yystr) );
+       return skel__scan_bytes(yystr,strlen(yystr) );
 }
 /* %endif */
 
 /* %if-c-only */
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to skel_lex() will
  * scan from a @e copy of @a bytes.
  * @param yybytes the byte buffer to scan
  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */
-YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
+YY_BUFFER_STATE skel__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
 {
        YY_BUFFER_STATE b;
        char *buf;
@@ -2269,19 +2035,19 @@ YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
        int i;
     
        /* Get memory for full buffer, including space for trailing EOB's. */
-       n = (yy_size_t) (_yybytes_len + 2);
-       buf = (char *) yyalloc( n  );
+       n = _yybytes_len + 2;
+       buf = (char *) skel_alloc(n  );
        if ( ! buf )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+               YY_FATAL_ERROR( "out of dynamic memory in skel__scan_bytes()" );
 
        for ( i = 0; i < _yybytes_len; ++i )
                buf[i] = yybytes[i];
 
        buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
 
-       b = yy_scan_buffer( buf, n );
+       b = skel__scan_buffer(buf,n );
        if ( ! b )
-               YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+               YY_FATAL_ERROR( "bad buffer in skel__scan_bytes()" );
 
        /* It's okay to grow etc. this buffer, and we should throw it
         * away when we're done.
@@ -2297,9 +2063,9 @@ YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
 #endif
 
 /* %if-c-only */
-static void yynoreturn yy_fatal_error (const char* msg )
+static void yy_fatal_error (yyconst char* msg )
 {
-                       fprintf( stderr, "%s\n", msg );
+       (void) fprintf( stderr, "%s\n", msg );
        exit( YY_EXIT_FAILURE );
 }
 /* %endif */
@@ -2312,14 +2078,14 @@ static void yynoreturn yy_fatal_error (const char* msg )
 #define yyless(n) \
        do \
                { \
-               /* Undo effects of setting up yytext. */ \
+               /* Undo effects of setting up skel_text. */ \
         int yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
-               yytext[yyleng] = (yy_hold_char); \
-               (yy_c_buf_p) = yytext + yyless_macro_arg; \
+               skel_text[skel_leng] = (yy_hold_char); \
+               (yy_c_buf_p) = skel_text + yyless_macro_arg; \
                (yy_hold_char) = *(yy_c_buf_p); \
                *(yy_c_buf_p) = '\0'; \
-               yyleng = yyless_macro_arg; \
+               skel_leng = yyless_macro_arg; \
                } \
        while ( 0 )
 
@@ -2332,82 +2098,82 @@ static void yynoreturn yy_fatal_error (const char* msg )
 /** Get the current line number.
  * 
  */
-int yyget_lineno  (void)
+int skel_get_lineno  (void)
 {
-    
-    return yylineno;
+        
+    return skel_lineno;
 }
 
 /** Get the input stream.
  * 
  */
-FILE *yyget_in  (void)
+FILE *skel_get_in  (void)
 {
-        return yyin;
+        return skel_in;
 }
 
 /** Get the output stream.
  * 
  */
-FILE *yyget_out  (void)
+FILE *skel_get_out  (void)
 {
-        return yyout;
+        return skel_out;
 }
 
 /** Get the length of the current token.
  * 
  */
-int yyget_leng  (void)
+int skel_get_leng  (void)
 {
-        return yyleng;
+        return skel_leng;
 }
 
 /** Get the current token.
  * 
  */
 
-char *yyget_text  (void)
+char *skel_get_text  (void)
 {
-        return yytext;
+        return skel_text;
 }
 
 /* %if-reentrant */
 /* %endif */
 
 /** Set the current line number.
- * @param _line_number line number
+ * @param line_number
  * 
  */
-void yyset_lineno (int  _line_number )
+void skel_set_lineno (int  line_number )
 {
     
-    yylineno = _line_number;
+    skel_lineno = line_number;
 }
 
 /** Set the input stream. This does not discard the current
  * input buffer.
- * @param _in_str A readable stream.
+ * @param in_str A readable stream.
  * 
- * @see yy_switch_to_buffer
+ * @see skel__switch_to_buffer
  */
-void yyset_in (FILE *  _in_str )
+void skel_set_in (FILE *  in_str )
 {
-        yyin = _in_str ;
+        skel_in = in_str ;
 }
 
-void yyset_out (FILE *  _out_str )
+void skel_set_out (FILE *  out_str )
 {
-        yyout = _out_str ;
+        skel_out = out_str ;
 }
 
-int yyget_debug  (void)
+int skel_get_debug  (void)
 {
-        return yy_flex_debug;
+        return skel__flex_debug;
 }
 
-void yyset_debug (int  _bdebug )
+void skel_set_debug (int  bdebug )
 {
-        yy_flex_debug = _bdebug ;
+        skel__flex_debug = bdebug ;
 }
 
 /* %endif */
@@ -2421,50 +2187,50 @@ void yyset_debug (int  _bdebug )
 static int yy_init_globals (void)
 {
         /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from yylex_destroy(), so don't allocate here.
+     * This function is called from skel_lex_destroy(), so don't allocate here.
      */
 
-    (yy_buffer_stack) = NULL;
+    (yy_buffer_stack) = 0;
     (yy_buffer_stack_top) = 0;
     (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = NULL;
+    (yy_c_buf_p) = (char *) 0;
     (yy_init) = 0;
     (yy_start) = 0;
 
 /* Defined in main.c */
 #ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
+    skel_in = stdin;
+    skel_out = stdout;
 #else
-    yyin = NULL;
-    yyout = NULL;
+    skel_in = (FILE *) 0;
+    skel_out = (FILE *) 0;
 #endif
 
     /* For future reference: Set errno on error, since we are called by
-     * yylex_init()
+     * skel_lex_init()
      */
     return 0;
 }
 /* %endif */
 
 /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy  (void)
+/* skel_lex_destroy is for both reentrant and non-reentrant scanners. */
+int skel_lex_destroy  (void)
 {
     
     /* Pop the buffer stack, destroying each element. */
        while(YY_CURRENT_BUFFER){
-               yy_delete_buffer( YY_CURRENT_BUFFER  );
+               skel__delete_buffer(YY_CURRENT_BUFFER  );
                YY_CURRENT_BUFFER_LVALUE = NULL;
-               yypop_buffer_state();
+               skel_pop_buffer_state();
        }
 
        /* Destroy the stack itself. */
-       yyfree((yy_buffer_stack) );
+       skel_free((yy_buffer_stack) );
        (yy_buffer_stack) = NULL;
 
     /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * yylex() is called, initialization will occur. */
+     * skel_lex() is called, initialization will occur. */
     yy_init_globals( );
 
 /* %if-reentrant */
@@ -2478,19 +2244,18 @@ int yylex_destroy  (void)
  */
 
 #ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 {
-               
-       int i;
+       register int i;
        for ( i = 0; i < n; ++i )
                s1[i] = s2[i];
 }
 #endif
 
 #ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s )
+static int yy_flex_strlen (yyconst char * s )
 {
-       int n;
+       register int n;
        for ( n = 0; s[n]; ++n )
                ;
 
@@ -2498,14 +2263,13 @@ static int yy_flex_strlen (const char * s )
 }
 #endif
 
-void *yyalloc (yy_size_t  size )
+void *skel_alloc (yy_size_t  size )
 {
-                       return malloc(size);
+       return (void *) malloc( size );
 }
 
-void *yyrealloc  (void * ptr, yy_size_t  size )
+void *skel_realloc  (void * ptr, yy_size_t  size )
 {
-               
        /* The cast to (char *) in the following accommodates both
         * implementations that use char* generic pointers, and those
         * that use void* generic pointers.  It works with the latter
@@ -2513,12 +2277,12 @@ void *yyrealloc  (void * ptr, yy_size_t  size )
         * any pointer type to void*, and deal with argument conversions
         * as though doing an assignment.
         */
-       return realloc(ptr, size);
+       return (void *) realloc( (char *) ptr, size );
 }
 
-void yyfree (void * ptr )
+void skel_free (void * ptr )
 {
-                       free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
+       free( (char *) ptr );   /* see skel_realloc() for (char *) cast */
 }
 
 /* %if-tables-serialization definitions */
@@ -2528,15 +2292,16 @@ void yyfree (void * ptr )
 
 /* %ok-for-header */
 
-#line 143 "/Users/akim/src/gnu/bison/src/scan-skel.l"
+#line 142 "src/scan-skel.l"
+
 
 
 static void
 at_init (int *argc, char *argv[], at_directive *at_ptr, at_directive fun)
 {
   *at_ptr = fun;
-  yytext[yyleng-1] = '\0';
-  obstack_grow (&obstack_for_string, yytext, yyleng);
+  skel_text[skel_leng-1] = '\0';
+  obstack_grow (&obstack_for_string, skel_text, skel_leng);
   argv[(*argc)++] = obstack_finish (&obstack_for_string);
   BEGIN SC_AT_DIRECTIVE_ARGS;
 }
@@ -2564,7 +2329,7 @@ skel_scanner_free (void)
 {
   obstack_free (&obstack_for_string, 0);
   /* Reclaim Flex's buffers.  */
-  yylex_destroy ();
+  skel_lex_destroy ();
 }
 
 static inline warnings
@@ -2592,7 +2357,7 @@ at_basename (int argc, char *argv[], char **out_namep, int *out_linenop)
   (void) out_linenop;
   if (2 < argc)
     fail_for_at_directive_too_many_args (argv[0]);
-  fputs (last_component (argv[1]), yyout);
+  fputs (last_component (argv[1]), skel_out);
 }
 
 static void
@@ -2631,12 +2396,12 @@ at_output (int argc, char *argv[], char **out_namep, int *out_linenop)
   if (*out_namep)
     {
       free (*out_namep);
-      xfclose (yyout);
+      xfclose (skel_out);
     }
   *out_namep = xstrdup (argv[1]);
   output_file_name_check (out_namep, true);
   /* If there were errors, do not generate the output.  */
-  yyout = xfopen (complaint_status ? "/dev/null" : *out_namep, "w");
+  skel_out = xfopen (complaint_status ? "/dev/null" : *out_namep, "w");
   *out_linenop = 1;
 }