Fix the syck/lib/gram.y

This resolves a problem during compilation:

../../../rpm/syck/lib/gram.y:66:27: error: 'parser' undeclared (first use in this function)
            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, $1 );
                           ^
../../../rpm/syck/lib/gram.y:66:27: note: each undeclared identifier is reported only once for each function it appears in
../../../rpm/syck/lib/syck.c: In function 'syck_parse':
../../../rpm/syck/lib/syck.c:516:5: warning: implicit declaration of function 'syckparse' [-Wimplicit-function-declaration]
     syckparse( p );
     ^

This patch was generated by reverting the grammer back to a previous
version.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>

Index: rpm/syck/lib/gram.y
===================================================================
--- rpm.orig/syck/lib/gram.y
+++ rpm/syck/lib/gram.y
@@ -9,18 +9,10 @@
 
 %start doc
 %pure-parser
-%parse-param {void* parser}
-%lex-param {void* parser}
 
 
 %{
 
-#define YYDEBUG 1
-#define YYERROR_VERBOSE 1
-#ifndef YYSTACK_USE_ALLOCA
-#define YYSTACK_USE_ALLOCA 0
-#endif
-
 #include "system.h"
 #include "syck.h"
 #include "debug.h"
@@ -28,6 +20,9 @@
 void apply_seq_in_map( SyckParser *parser, SyckNode *n )
 	/*@*/;
 
+#define YYPARSE_PARAM   parser
+#define YYLEX_PARAM     parser
+
 #define NULL_NODE(parser, node) \
         SyckNode *node = syck_new_str( "", scalar_plain ); \
         if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
Index: rpm/syck/lib/Makefile.am
===================================================================
--- rpm.orig/syck/lib/Makefile.am
+++ rpm/syck/lib/Makefile.am
@@ -49,25 +49,25 @@ SYCK_SPLINT_SRCS = \
 	token.c \
 	implicit.c
 
-#gram.c:	gram.y
-#	$(YACC) -d -t -v -p syck -o $@ $<
-#	-@if test -f gram.c; then \
-#	{ echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
-#	  echo "/*@-noeffect -noeffectuncon @*/";\
-#	  echo "/*@-nullassign @*/";\
-#	  echo "/*@-readonlytrans @*/";\
-#	  echo "/*@-uniondef @*/";\
-#	  echo "/*@-warnlintcomments @*/";\
-#	  cat gram.c;\
-#	  echo "/*@=warnlintcomments @*/";\
-#	  echo "/*@=uniondef @*/";\
-#	  echo "/*@=readonlytrans @*/";\
-#	  echo "/*@=nullassign @*/";\
-#	  echo "/*@=noeffect =noeffectuncon @*/";\
-#	  echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
-#	} > _gram.c ;\
-#	  mv -f _gram.c gram.c; \
-#	fi
+gram.c:	gram.y
+	$(YACC) -d -t -v -p syck -o $@ $<
+	-@if test -f gram.c; then \
+	{ echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
+	  echo "/*@-noeffect -noeffectuncon @*/";\
+	  echo "/*@-nullassign @*/";\
+	  echo "/*@-readonlytrans @*/";\
+	  echo "/*@-uniondef @*/";\
+	  echo "/*@-warnlintcomments @*/";\
+	  cat gram.c;\
+	  echo "/*@=warnlintcomments @*/";\
+	  echo "/*@=uniondef @*/";\
+	  echo "/*@=readonlytrans @*/";\
+	  echo "/*@=nullassign @*/";\
+	  echo "/*@=noeffect =noeffectuncon @*/";\
+	  echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
+	} > _gram.c ;\
+	  mv -f _gram.c gram.c; \
+	fi
 
 BUILT_SOURCES = gram.c gram.h
 
Index: rpm/syck/lib/implicit.c
===================================================================
--- rpm.orig/syck/lib/implicit.c
+++ rpm/syck/lib/implicit.c
@@ -19,11 +19,6 @@
 #define YYLIMIT     limit
 #define YYFILL(n)
 
-#ifdef  __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wempty-body"
-#endif
-
 void
 try_tag_implicit( SyckNode *n, int taguri )
 {
@@ -3000,8 +2995,4 @@ yy270:	++YYCURSOR;
 
 }
 
-#ifdef  __clang__
-#pragma clang diagnostic pop
-#endif
-
 /*@=noret@*/
Index: rpm/syck/lib/syck.c
===================================================================
--- rpm.orig/syck/lib/syck.c
+++ rpm/syck/lib/syck.c
@@ -519,7 +519,7 @@ syck_parse( SyckParser *p )
 }
 
 void
-syck_default_error_handler( SyckParser *p, const char *msg )
+syck_default_error_handler( SyckParser *p, char *msg )
 {
     printf( "Error at [Line %d, Col %ld]: %s\n", 
         p->linect,
Index: rpm/syck/lib/syck.h
===================================================================
--- rpm.orig/syck/lib/syck.h
+++ rpm/syck/lib/syck.h
@@ -175,7 +175,7 @@ typedef struct _syck_str SyckIoStr;
 typedef struct _syck_level SyckLevel;
 
 typedef SYMID (*SyckNodeHandler)(SyckParser *p, SyckNode *n);
-typedef void (*SyckErrorHandler)(SyckParser *p, const char *);
+typedef void (*SyckErrorHandler)(SyckParser *p, char *);
 typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *p, char *);
 typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long); 
 typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long);
@@ -546,7 +546,7 @@ long syck_parser_readlen( SyckParser *p,
 SYMID syck_parse( SyckParser *p )
 	/*@globals fileSystem @*/
 	/*@modifies p, fileSystem @*/;
-void syck_default_error_handler( SyckParser *p, const char * )
+void syck_default_error_handler( SyckParser *p, char * )
 	/*@globals fileSystem @*/
 	/*@modifies p, fileSystem @*/;
 SYMID syck_yaml2byte_handler( SyckParser *p, SyckNode *n )
@@ -619,7 +619,7 @@ long syck_seq_count( SyckNode *seq )
 /*
  * Lexer prototypes
  */
-void syckerror( void *, const char *msg )
+void syckerror( char *msg )
 	/*@*/;
 /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */
 int sycklex( void *_sycklval, SyckParser *parser )
Index: rpm/syck/lib/token.c
===================================================================
--- rpm.orig/syck/lib/token.c
+++ rpm/syck/lib/token.c
@@ -270,11 +270,11 @@ sycklex( void * _sycklval, SyckParser *p
         return sycklex_yaml_utf8( sycklval, parser );
 
         case syck_yaml_utf16:
-            syckerror( parser, "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
+            syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
         break;
 
         case syck_yaml_utf32:
-            syckerror( parser, "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
+            syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
         break;
 
         case syck_bytecode_utf8:
@@ -2739,15 +2739,14 @@ syckwrap(void)
 }
 
 void 
-syckerror( void *p, const char *msg )
+syckerror( char *msg )
 {
-    SyckParser * parser = (SyckParser *)p;
 /*@-mods@*/
-    if ( parser->error_handler == NULL )
-        parser->error_handler = syck_default_error_handler;
+    if ( syck_parser_ptr->error_handler == NULL )
+        syck_parser_ptr->error_handler = syck_default_error_handler;
 
-    parser->root = parser->root_on_error;
+    syck_parser_ptr->root = syck_parser_ptr->root_on_error;
 /*@=mods@*/
-    (parser->error_handler)(parser, msg);
+    (syck_parser_ptr->error_handler)(syck_parser_ptr, msg);
 }
 
Index: rpm/syck/lib/bytecode.c
===================================================================
--- rpm.orig/syck/lib/bytecode.c
+++ rpm/syck/lib/bytecode.c
@@ -1,10 +1,10 @@
-/* Generated by re2c 0.9.12 on Tue Mar 14 00:14:53 2006 */
+/* Generated by re2c 0.13.5 on Tue Feb 23 12:04:00 2016 */
 #line 1 "bytecode.re"
 /*
  * bytecode.re
  *
  * $Author: why $
- * $Date: 2005-09-20 08:21:06 +0300 (Tue, 20 Sep 2005) $
+ * $Date: 2005/09/20 05:21:06 $
  *
  * Copyright (C) 2003 why the lucky stiff
  */
@@ -27,14 +27,11 @@
 #define YYLINEPTR   parser->lineptr
 #define YYLINECTPTR parser->linectptr
 #define YYLINE      parser->linect
-#define YYFILL(n)   (void) syck_parser_read(parser)
+#define YYFILL(n)   syck_parser_read(parser)
 
-/*@unchecked@*/ /*@null@*/
 extern SyckParser *syck_parser_ptr;
 
-/*@null@*/
-char *get_inline( SyckParser *parser )
-	/*@modifies parser @*/;
+char *get_inline( SyckParser *parser );
 
 /*
  * Repositions the cursor at `n' offset from the token start.
@@ -137,14 +134,12 @@ char *get_inline( SyckParser *parser )
  */
 int
 sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
-	/*@globals syck_parser_ptr @*/
-	/*@modifies sycklval, parser, syck_parser_ptr @*/
 {
     SyckLevel *lvl;
     syck_parser_ptr = parser;
     if ( YYCURSOR == NULL ) 
     {
-        (void) syck_parser_read( parser );
+        syck_parser_read( parser );
     }
 
     if ( parser->force_token != 0 )
@@ -171,42 +166,37 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval
 #line 165 "<stdout>"
 {
 	YYCTYPE yych;
-	unsigned int yyaccept = 0;
-	goto yy0;
-	/*@notreached@*/
-	++YYCURSOR;
-yy0:
-	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+
+	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
 	yych = *YYCURSOR;
-	switch(yych){
+	switch (yych) {
 	case 0x00:	goto yy2;
 	case 'D':	goto yy3;
 	default:	goto yy5;
 	}
-yy2:	YYCURSOR = YYMARKER;
-	switch(yyaccept){
-	case 0:	goto yy4;
-	}
-yy3:	yyaccept = 0;
+yy2:
+	YYCURSOR = YYMARKER;
+	goto yy4;
+yy3:
 	yych = *(YYMARKER = ++YYCURSOR);
-	switch(yych){
-	case 0x0A:	goto yy6;
-	case 0x0D:	goto yy8;
+	switch (yych) {
+	case '\n':	goto yy6;
+	case '\r':	goto yy8;
 	default:	goto yy4;
 	}
 yy4:
 #line 199 "bytecode.re"
-{   YYPOS(0);
+	{   YYPOS(0);
             goto Document;
         }
-#line 195 "<stdout>"
-yy5:	yych = *++YYCURSOR;
+#line 191 "<stdout>"
+yy5:
+	yych = *++YYCURSOR;
 	goto yy4;
-yy6:	++YYCURSOR;
-	goto yy7;
-yy7:
+yy6:
+	++YYCURSOR;
 #line 186 "bytecode.re"
-{   if ( lvl->status == syck_lvl_header )
+	{   if ( lvl->status == syck_lvl_header )
             {
                 CHK_NL(YYCURSOR);
                 goto Directive;
@@ -218,10 +208,11 @@ yy7:
                 return 0;
             }
         }
-#line 214 "<stdout>"
-yy8:	++YYCURSOR;
-	switch((yych = *YYCURSOR)) {
-	case 0x0A:	goto yy6;
+#line 210 "<stdout>"
+yy8:
+	++YYCURSOR;
+	switch ((yych = *YYCURSOR)) {
+	case '\n':	goto yy6;
 	default:	goto yy2;
 	}
 }
@@ -239,19 +230,15 @@ Document:
         YYTOKEN = YYCURSOR;
 
 
-#line 235 "<stdout>"
+#line 232 "<stdout>"
 {
 	YYCTYPE yych;
-	goto yy9;
-	/*@notreached@*/
-	++YYCURSOR;
-yy9:
-	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
 	yych = *YYCURSOR;
-	switch(yych){
+	switch (yych) {
 	case 0x00:	goto yy30;
-	case 0x0A:	goto yy27;
-	case 0x0D:	goto yy29;
+	case '\n':	goto yy27;
+	case '\r':	goto yy29;
 	case 'A':	goto yy19;
 	case 'D':	goto yy12;
 	case 'E':	goto yy16;
@@ -264,71 +251,73 @@ yy9:
 	case 'c':	goto yy25;
 	default:	goto yy11;
 	}
-yy11:yy12:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy41;
-	case 0x0D:	goto yy44;
+yy11:
+yy12:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy41;
+	case '\r':	goto yy44;
 	default:	goto yy11;
 	}
-yy13:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy41;
-	case 0x0D:	goto yy43;
+yy13:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy41;
+	case '\r':	goto yy43;
 	default:	goto yy11;
 	}
-yy14:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy38;
-	case 0x0D:	goto yy40;
+yy14:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy38;
+	case '\r':	goto yy40;
 	default:	goto yy11;
 	}
-yy15:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy35;
-	case 0x0D:	goto yy37;
+yy15:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy35;
+	case '\r':	goto yy37;
 	default:	goto yy11;
 	}
-yy16:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy32;
-	case 0x0D:	goto yy34;
+yy16:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy32;
+	case '\r':	goto yy34;
 	default:	goto yy11;
 	}
-yy17:	++YYCURSOR;
-	goto yy18;
-yy18:
+yy17:
+	++YYCURSOR;
 #line 288 "bytecode.re"
-{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str); 
+	{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str); 
             goto Scalar;
         }
-#line 296 "<stdout>"
-yy19:	++YYCURSOR;
-	goto yy20;
-yy20:
+#line 295 "<stdout>"
+yy19:
+	++YYCURSOR;
 #line 292 "bytecode.re"
-{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
+	{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
             sycklval->name = get_inline( parser );
             syck_hdlr_remove_anchor( parser, sycklval->name );
             CHK_NL(YYCURSOR);
             return YAML_ANCHOR;
         }
-#line 307 "<stdout>"
-yy21:	++YYCURSOR;
-	goto yy22;
-yy22:
+#line 305 "<stdout>"
+yy21:
+	++YYCURSOR;
 #line 299 "bytecode.re"
-{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
+	{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
             sycklval->name = get_inline( parser );
             POP_LEVEL();
             if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
             return YAML_ALIAS;
         }
-#line 318 "<stdout>"
-yy23:	++YYCURSOR;
-	goto yy24;
-yy24:
+#line 315 "<stdout>"
+yy23:
+	++YYCURSOR;
 #line 306 "bytecode.re"
-{   char *qstr;
+	{   char *qstr;
             ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
             qstr = get_inline( parser );
             CHK_NL(YYCURSOR);
@@ -387,18 +376,16 @@ yy24:
             sycklval->name = qstr;
             return YAML_TAGURI;
         }
-#line 382 "<stdout>"
-yy25:	++YYCURSOR;
-	goto yy26;
-yy26:
+#line 378 "<stdout>"
+yy25:
+	++YYCURSOR;
 #line 366 "bytecode.re"
-{   goto Comment; }
-#line 388 "<stdout>"
-yy27:	++YYCURSOR;
-	goto yy28;
-yy28:
+	{   goto Comment; }
+#line 383 "<stdout>"
+yy27:
+	++YYCURSOR;
 #line 368 "bytecode.re"
-{   CHK_NL(YYCURSOR);
+	{   CHK_NL(YYCURSOR);
             if ( lvl->status == syck_lvl_seq )
             {
                 return YAML_INDENT; 
@@ -410,26 +397,25 @@ yy28:
             }
             goto Document;
         }
-#line 405 "<stdout>"
-yy29:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy27;
+#line 399 "<stdout>"
+yy29:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy27;
 	default:	goto yy11;
 	}
-yy30:	++YYCURSOR;
-	goto yy31;
-yy31:
+yy30:
+	++YYCURSOR;
 #line 381 "bytecode.re"
-{   ENSURE_YAML_IEND(lvl, -1);
+	{   ENSURE_YAML_IEND(lvl, -1);
             YYPOS(0);
             return 0;
         }
-#line 419 "<stdout>"
-yy32:	++YYCURSOR;
-	goto yy33;
-yy33:
+#line 413 "<stdout>"
+yy32:
+	++YYCURSOR;
 #line 252 "bytecode.re"
-{   if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
+	{   if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
             {
                 lvl->ncount++;
                 YYPOS(0);
@@ -464,17 +450,17 @@ yy33:
             CHK_NL(YYCURSOR);
             return YAML_IEND;
         }
-#line 459 "<stdout>"
-yy34:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy32;
+#line 452 "<stdout>"
+yy34:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy32;
 	default:	goto yy11;
 	}
-yy35:	++YYCURSOR;
-	goto yy36;
-yy36:
+yy35:
+	++YYCURSOR;
 #line 237 "bytecode.re"
-{   int complex = 0;
+	{   int complex = 0;
             if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
             {
                 complex = 1;
@@ -488,17 +474,17 @@ yy36:
             }
             return YAML_IOPEN;
         }
-#line 483 "<stdout>"
-yy37:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy35;
+#line 476 "<stdout>"
+yy37:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy35;
 	default:	goto yy11;
 	}
-yy38:	++YYCURSOR;
-	goto yy39;
-yy39:
+yy38:
+	++YYCURSOR;
 #line 222 "bytecode.re"
-{   int complex = 0;
+	{   int complex = 0;
             if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
             {
                 complex = 1;
@@ -512,29 +498,31 @@ yy39:
             }
             return YAML_IOPEN;
         }
-#line 507 "<stdout>"
-yy40:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy38;
+#line 500 "<stdout>"
+yy40:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy38;
 	default:	goto yy11;
 	}
-yy41:	++YYCURSOR;
-	goto yy42;
-yy42:
+yy41:
+	++YYCURSOR;
 #line 217 "bytecode.re"
-{   ENSURE_YAML_IEND(lvl, -1);
+	{   ENSURE_YAML_IEND(lvl, -1);
                 YYPOS(0);
                 return 0;
             }
-#line 521 "<stdout>"
-yy43:	yych = *++YYCURSOR;
-	switch(yych){
-	case 0x0A:	goto yy41;
+#line 514 "<stdout>"
+yy43:
+	yych = *++YYCURSOR;
+	switch (yych) {
+	case '\n':	goto yy41;
 	default:	goto yy11;
 	}
-yy44:	++YYCURSOR;
-	switch((yych = *YYCURSOR)) {
-	case 0x0A:	goto yy41;
+yy44:
+	++YYCURSOR;
+	switch ((yych = *YYCURSOR)) {
+	case '\n':	goto yy41;
 	default:	goto yy11;
 	}
 }
@@ -548,28 +536,22 @@ Directive:
         YYTOKEN = YYCURSOR;
 
 
-#line 543 "<stdout>"
+#line 538 "<stdout>"
 {
 	YYCTYPE yych;
-	unsigned int yyaccept = 0;
-	goto yy45;
-	/*@notreached@*/
-	++YYCURSOR;
-yy45:
-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
 	yych = *YYCURSOR;
-	switch(yych){
+	switch (yych) {
 	case 0x00:	goto yy47;
 	case 'V':	goto yy48;
 	default:	goto yy50;
 	}
-yy47:	YYCURSOR = YYMARKER;
-	switch(yyaccept){
-	case 0:	goto yy49;
-	}
-yy48:	yyaccept = 0;
+yy47:
+	YYCURSOR = YYMARKER;
+	goto yy49;
+yy48:
 	yych = *(YYMARKER = ++YYCURSOR);
-	switch(yych){
+	switch (yych) {
 	case '.':
 	case '/':
 	case '0':
@@ -619,7 +601,8 @@ yy48:	yyaccept = 0;
 	case '\\':
 	case ']':
 	case '^':
-	case '_':	case 'a':
+	case '_':
+	case 'a':
 	case 'b':
 	case 'c':
 	case 'd':
@@ -649,17 +632,18 @@ yy48:	yyaccept = 0;
 	}
 yy49:
 #line 399 "bytecode.re"
-{   YYCURSOR = YYTOKEN;
+	{   YYCURSOR = YYTOKEN;
                return YAML_DOCSEP;
            }
-#line 646 "<stdout>"
-yy50:	yych = *++YYCURSOR;
+#line 637 "<stdout>"
+yy50:
+	yych = *++YYCURSOR;
 	goto yy49;
-yy51:	++YYCURSOR;
-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+yy51:
+	++YYCURSOR;
+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
 	yych = *YYCURSOR;
-	goto yy52;
-yy52:	switch(yych){
+	switch (yych) {
 	case '.':
 	case '/':
 	case '0':
@@ -671,7 +655,8 @@ yy52:	switch(yych){
 	case '6':
 	case '7':
 	case '8':
-	case '9':	case ';':
+	case '9':
+	case ';':
 	case '<':
 	case '=':
 	case '>':
@@ -707,7 +692,8 @@ yy52:	switch(yych){
 	case '\\':
 	case ']':
 	case '^':
-	case '_':	case 'a':
+	case '_':
+	case 'a':
 	case 'b':
 	case 'c':
 	case 'd':
@@ -736,8 +722,9 @@ yy52:	switch(yych){
 	case ':':	goto yy53;
 	default:	goto yy47;
 	}
-yy53:	yych = *++YYCURSOR;
-	switch(yych){
+yy53:
+	yych = *++YYCURSOR;
+	switch (yych) {
 	case '.':
 	case '/':
 	case '0':
@@ -787,7 +774,8 @@ yy53:	yych = *++YYCURSOR;
 	case '\\':
 	case ']':
 	case '^':
-	case '_':	case 'a':
+	case '_':
+	case 'a':
 	case 'b':
 	case 'c':
 	case 'd':
@@ -815,13 +803,13 @@ yy53:	yych = *++YYCURSOR;
 	case 'z':	goto yy54;
 	default:	goto yy47;
 	}
-yy54:	++YYCURSOR;
-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+yy54:
+	++YYCURSOR;
+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
 	yych = *YYCURSOR;
-	goto yy55;
-yy55:	switch(yych){
-	case 0x0A:	goto yy56;
-	case 0x0D:	goto yy58;
+	switch (yych) {
+	case '\n':	goto yy56;
+	case '\r':	goto yy58;
 	case '.':
 	case '/':
 	case '0':
@@ -871,7 +859,8 @@ yy55:	switch(yych){
 	case '\\':
 	case ']':
 	case '^':
-	case '_':	case 'a':
+	case '_':
+	case 'a':
 	case 'b':
 	case 'c':
 	case 'd':
@@ -899,16 +888,16 @@ yy55:	switch(yych){
 	case 'z':	goto yy54;
 	default:	goto yy47;
 	}
-yy56:	++YYCURSOR;
-	goto yy57;
-yy57:
+yy56:
+	++YYCURSOR;
 #line 396 "bytecode.re"
-{   CHK_NL(YYCURSOR);
+	{   CHK_NL(YYCURSOR);
                goto Directive; }
-#line 899 "<stdout>"
-yy58:	++YYCURSOR;
-	switch((yych = *YYCURSOR)) {
-	case 0x0A:	goto yy56;
+#line 895 "<stdout>"
+yy58:
+	++YYCURSOR;
+	switch ((yych = *YYCURSOR)) {
+	case '\n':	goto yy56;
 	default:	goto yy47;
 	}
 }
@@ -922,40 +911,40 @@ Comment:
         YYTOKEN = YYCURSOR;
 
 
-#line 916 "<stdout>"
+#line 913 "<stdout>"
 {
 	YYCTYPE yych;
-	goto yy59;
-	/*@notreached@*/
-	++YYCURSOR;
-yy59:
-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
 	yych = *YYCURSOR;
-	switch(yych){
+	switch (yych) {
 	case 0x00:	goto yy61;
-	case 0x0A:	goto yy62;
-	case 0x0D:	goto yy64;
+	case '\n':	goto yy62;
+	case '\r':	goto yy64;
 	default:	goto yy66;
 	}
-yy61:yy62:	++YYCURSOR;
-	goto yy63;
+yy61:
+yy62:
+	++YYCURSOR;
 yy63:
 #line 412 "bytecode.re"
-{   CHK_NL(YYCURSOR);
+	{   CHK_NL(YYCURSOR);
                 goto Document; }
-#line 936 "<stdout>"
-yy64:	++YYCURSOR;
-	switch((yych = *YYCURSOR)) {
-	case 0x0A:	goto yy67;
+#line 931 "<stdout>"
+yy64:
+	++YYCURSOR;
+	switch ((yych = *YYCURSOR)) {
+	case '\n':	goto yy67;
 	default:	goto yy65;
 	}
 yy65:
 #line 415 "bytecode.re"
-{   goto Comment; }
-#line 945 "<stdout>"
-yy66:	yych = *++YYCURSOR;
+	{   goto Comment; }
+#line 941 "<stdout>"
+yy66:
+	yych = *++YYCURSOR;
 	goto yy65;
-yy67:	++YYCURSOR;
+yy67:
+	++YYCURSOR;
 	yych = *YYCURSOR;
 	goto yy63;
 }
@@ -977,23 +966,20 @@ Scalar2:
     tok = YYCURSOR;
 
 
-#line 970 "<stdout>"
+#line 968 "<stdout>"
 {
 	YYCTYPE yych;
-	goto yy68;
-	/*@notreached@*/
-	++YYCURSOR;
-yy68:
-	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
 	yych = *YYCURSOR;
-	switch(yych){
+	switch (yych) {
 	case 0x00:	goto yy74;
-	case 0x0A:	goto yy70;
-	case 0x0D:	goto yy72;
+	case '\n':	goto yy70;
+	case '\r':	goto yy72;
 	default:	goto yy76;
 	}
-yy70:	++YYCURSOR;
-	switch((yych = *YYCURSOR)) {
+yy70:
+	++YYCURSOR;
+	switch ((yych = *YYCURSOR)) {
 	case 'C':	goto yy78;
 	case 'N':	goto yy80;
 	case 'Z':	goto yy83;
@@ -1001,50 +987,51 @@ yy70:	++YYCURSOR;
 	}
 yy71:
 #line 461 "bytecode.re"
-{   YYCURSOR = tok;
+	{   YYCURSOR = tok;
             goto ScalarEnd; 
         }
-#line 996 "<stdout>"
-yy72:	++YYCURSOR;
-	switch((yych = *YYCURSOR)) {
-	case 0x0A:	goto yy77;
+#line 992 "<stdout>"
+yy72:
+	++YYCURSOR;
+	switch ((yych = *YYCURSOR)) {
+	case '\n':	goto yy77;
 	default:	goto yy73;
 	}
 yy73:
 #line 469 "bytecode.re"
-{   CAT(str, cap, idx, tok[0]);
+	{   CAT(str, cap, idx, tok[0]);
             goto Scalar2; 
         }
-#line 1007 "<stdout>"
-yy74:	++YYCURSOR;
-	goto yy75;
-yy75:
+#line 1004 "<stdout>"
+yy74:
+	++YYCURSOR;
 #line 465 "bytecode.re"
-{   YYCURSOR = tok;
+	{   YYCURSOR = tok;
             goto ScalarEnd;
         }
-#line 1015 "<stdout>"
-yy76:	yych = *++YYCURSOR;
+#line 1011 "<stdout>"
+yy76:
+	yych = *++YYCURSOR;
 	goto yy73;
-yy77:	yych = *++YYCURSOR;
-	switch(yych){
+yy77:
+	yych = *++YYCURSOR;
+	switch (yych) {
 	case 'C':	goto yy78;
 	case 'N':	goto yy80;
 	case 'Z':	goto yy83;
 	default:	goto yy71;
 	}
-yy78:	++YYCURSOR;
-	goto yy79;
-yy79:
+yy78:
+	++YYCURSOR;
 #line 435 "bytecode.re"
-{   CHK_NL(tok+1);
+	{   CHK_NL(tok+1);
             goto Scalar2; }
-#line 1031 "<stdout>"
-yy80:	++YYCURSOR;
-	if(YYLIMIT == YYCURSOR) YYFILL(1);
+#line 1028 "<stdout>"
+yy80:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
-	goto yy81;
-yy81:	switch(yych){
+	switch (yych) {
 	case '0':
 	case '1':
 	case '2':
@@ -1059,7 +1046,7 @@ yy81:	switch(yych){
 	}
 yy82:
 #line 438 "bytecode.re"
-{   CHK_NL(tok+1);
+	{   CHK_NL(tok+1);
             if ( tok + 2 < YYCURSOR )
             {
                 char *count = tok + 2;
@@ -1076,16 +1063,15 @@ yy82:
             }
             goto Scalar2;
         }
-#line 1068 "<stdout>"
-yy83:	++YYCURSOR;
-	goto yy84;
-yy84:
+#line 1065 "<stdout>"
+yy83:
+	++YYCURSOR;
 #line 456 "bytecode.re"
-{   CHK_NL(tok+1);
+	{   CHK_NL(tok+1);
             CAT(str, cap, idx, '\0');
             goto Scalar2; 
         }
-#line 1077 "<stdout>"
+#line 1073 "<stdout>"
 }
 #line 473 "bytecode.re"
 
@@ -1122,50 +1108,48 @@ Inline:
         tok = YYCURSOR;
 
 
-#line 1114 "<stdout>"
+#line 1110 "<stdout>"
 {
 	YYCTYPE yych;
-	goto yy85;
-	/*@notreached@*/
-	++YYCURSOR;
-yy85:
-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
 	yych = *YYCURSOR;
-	switch(yych){
+	switch (yych) {
 	case 0x00:	goto yy91;
-	case 0x0A:	goto yy87;
-	case 0x0D:	goto yy89;
+	case '\n':	goto yy87;
+	case '\r':	goto yy89;
 	default:	goto yy93;
 	}
-yy87:	++YYCURSOR;
-	goto yy88;
+yy87:
+	++YYCURSOR;
 yy88:
 #line 508 "bytecode.re"
-{   CHK_NL(YYCURSOR);
+	{   CHK_NL(YYCURSOR);
                 return str; }
-#line 1134 "<stdout>"
-yy89:	++YYCURSOR;
-	switch((yych = *YYCURSOR)) {
-	case 0x0A:	goto yy94;
+#line 1127 "<stdout>"
+yy89:
+	++YYCURSOR;
+	switch ((yych = *YYCURSOR)) {
+	case '\n':	goto yy94;
 	default:	goto yy90;
 	}
 yy90:
 #line 515 "bytecode.re"
-{   CAT(str, cap, idx, tok[0]);
+	{   CAT(str, cap, idx, tok[0]);
                 goto Inline; 
             }
-#line 1145 "<stdout>"
-yy91:	++YYCURSOR;
-	goto yy92;
-yy92:
+#line 1139 "<stdout>"
+yy91:
+	++YYCURSOR;
 #line 511 "bytecode.re"
-{   YYCURSOR = tok;
+	{   YYCURSOR = tok;
                 return str;
             }
-#line 1153 "<stdout>"
-yy93:	yych = *++YYCURSOR;
+#line 1146 "<stdout>"
+yy93:
+	yych = *++YYCURSOR;
 	goto yy90;
-yy94:	++YYCURSOR;
+yy94:
+	++YYCURSOR;
 	yych = *YYCURSOR;
 	goto yy88;
 }
