[Redbutton-devel] SF.net SVN: redbutton: [386] redbutton-author/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-09-17 09:09:54
|
Revision: 386
http://redbutton.svn.sourceforge.net/redbutton/?rev=386&view=rev
Author: skilvington
Date: 2007-09-17 02:09:47 -0700 (Mon, 17 Sep 2007)
Log Message:
-----------
ignore // comments
Modified Paths:
--------------
redbutton-author/trunk/parser.l.footer
redbutton-author/trunk/parser.l.header
redbutton-author/trunk/tokens.h.header
Modified: redbutton-author/trunk/parser.l.footer
===================================================================
--- redbutton-author/trunk/parser.l.footer 2007-09-16 20:24:33 UTC (rev 385)
+++ redbutton-author/trunk/parser.l.footer 2007-09-17 09:09:47 UTC (rev 386)
@@ -19,6 +19,12 @@
{
token_t tok = yylex();
+ while(tok == COMMENT)
+ {
+ vverbose("peek: skip comment '%s'\n", yytext);
+ tok = yylex();
+ }
+
vverbose("peek: '%s'\n", yytext);
/* return it to the input stream */
@@ -41,6 +47,12 @@
{
token_t tok = yylex();
+ while(tok == COMMENT)
+ {
+ vverbose("next: skip comment '%s'\n", yytext);
+ tok = yylex();
+ }
+
vverbose("next: '%s'\n", yytext);
return tok;
Modified: redbutton-author/trunk/parser.l.header
===================================================================
--- redbutton-author/trunk/parser.l.header 2007-09-16 20:24:33 UTC (rev 385)
+++ redbutton-author/trunk/parser.l.header 2007-09-17 09:09:47 UTC (rev 386)
@@ -8,6 +8,7 @@
extern int yylineno;
%}
%%
+\/\/[^\n\r\f]* return COMMENT;
([-0-9][0-9]*)|(0x[0-9a-f]+) return INTEGER;
true|false return BOOLEAN;
\"((\\\")|[^"])*\" return STRING;
Modified: redbutton-author/trunk/tokens.h.header
===================================================================
--- redbutton-author/trunk/tokens.h.header 2007-09-16 20:24:33 UTC (rev 385)
+++ redbutton-author/trunk/tokens.h.header 2007-09-17 09:09:47 UTC (rev 386)
@@ -1,8 +1,9 @@
#define END_OF_SRC 0 /* must be 0 */
-#define INVALID 1
-#define INTEGER 2
-#define BOOLEAN 3
-#define STRING 4
-#define QPRINTABLE 5
-#define BASE64 6
-#define Null 7
+#define COMMENT 1
+#define INVALID 2
+#define INTEGER 3
+#define BOOLEAN 4
+#define STRING 5
+#define QPRINTABLE 6
+#define BASE64 7
+#define Null 8
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|