[Redbutton-devel] SF.net SVN: redbutton: [447] redbutton-author/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-10-18 10:05:05
|
Revision: 447
http://redbutton.svn.sourceforge.net/redbutton/?rev=447&view=rev
Author: skilvington
Date: 2007-10-18 03:05:02 -0700 (Thu, 18 Oct 2007)
Log Message:
-----------
don't use yy prefix for our variables, avoids problems with newer versions of flex
Modified Paths:
--------------
redbutton-author/trunk/ccc.l
redbutton-author/trunk/ccc.y
redbutton-author/trunk/parser.c.header
redbutton-author/trunk/parser.l.footer
redbutton-author/trunk/parser.l.header
Modified: redbutton-author/trunk/ccc.l
===================================================================
--- redbutton-author/trunk/ccc.l 2007-10-18 08:41:14 UTC (rev 446)
+++ redbutton-author/trunk/ccc.l 2007-10-18 10:05:02 UTC (rev 447)
@@ -2,7 +2,7 @@
#include <string.h>
#define YYSTYPE char *
#include "ccc.tab.h"
-extern unsigned int yylineno;
+extern unsigned int lineno;
%}
%%
\/\/[^\n\r\f]* return COMMENT;
@@ -15,7 +15,7 @@
"+" return ONEORMORE;
"?" return IDENTORNULL;
"." return ENDCLAUSE;
-[\n\r\f] yylineno ++;
+[\n\r\f] lineno ++;
[ \t]+ /* ignore whitespace */
. return INVALID;
%%
Modified: redbutton-author/trunk/ccc.y
===================================================================
--- redbutton-author/trunk/ccc.y 2007-10-18 08:41:14 UTC (rev 446)
+++ redbutton-author/trunk/ccc.y 2007-10-18 10:05:02 UTC (rev 447)
@@ -86,13 +86,13 @@
void file_append(FILE *, char *);
/* input line we are currently parsing */
-unsigned int yylineno = 1;
+unsigned int lineno = 1;
/* yacc functions we need to provide */
void
yyerror(const char *str)
{
- fprintf(stderr, "Error: %s at line %u\n", str, yylineno);
+ fprintf(stderr, "Error: %s at line %u\n", str, lineno);
return;
}
Modified: redbutton-author/trunk/parser.c.header
===================================================================
--- redbutton-author/trunk/parser.c.header 2007-10-18 08:41:14 UTC (rev 446)
+++ redbutton-author/trunk/parser.c.header 2007-10-18 10:05:02 UTC (rev 447)
@@ -28,15 +28,15 @@
* lexer functions we need to provide
*/
-unsigned int yylineno = 1;
-unsigned int yynerrs = 0;
+unsigned int lineno = 1;
+unsigned int nerrs = 0;
void
yyerror(const char *str)
{
- fprintf(stderr, "Error: %s at line %u\n", str, yylineno);
+ fprintf(stderr, "Error: %s at line %u\n", str, lineno);
- yynerrs ++;
+ nerrs ++;
return;
}
Modified: redbutton-author/trunk/parser.l.footer
===================================================================
--- redbutton-author/trunk/parser.l.footer 2007-10-18 08:41:14 UTC (rev 446)
+++ redbutton-author/trunk/parser.l.footer 2007-10-18 10:05:02 UTC (rev 447)
@@ -91,6 +91,6 @@
unsigned int
nparse_errors(void)
{
- return yynerrs;
+ return nerrs;
}
Modified: redbutton-author/trunk/parser.l.header
===================================================================
--- redbutton-author/trunk/parser.l.header 2007-10-18 08:41:14 UTC (rev 446)
+++ redbutton-author/trunk/parser.l.header 2007-10-18 10:05:02 UTC (rev 447)
@@ -5,8 +5,8 @@
#include <errno.h>
#include "parser.h"
#include "tokens.h"
-extern unsigned int yylineno;
-extern unsigned int yynerrs;
+extern unsigned int lineno;
+extern unsigned int nerrs;
%}
%%
\/\/[^\n\r\f]* return COMMENT;
@@ -16,5 +16,5 @@
'[^']*' return QPRINTABLE;
`[^`]*` return BASE64;
null return Null;
-[\n\r\f] yylineno ++;
+[\n\r\f] lineno ++;
[ \t]+ /* ignore whitespace */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|