summaryrefslogtreecommitdiff
path: root/src/parser.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.l')
-rw-r--r--src/parser.l12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/parser.l b/src/parser.l
index e0bc340..7957c53 100644
--- a/src/parser.l
+++ b/src/parser.l
@@ -55,14 +55,15 @@ false { yylval->bValue = false; return tokBool; }
55null { return tokNull; } 55null { return tokNull; }
56 56
57"<<" { BEGIN( sitname ); } 57"<<" { BEGIN( sitname ); }
58<sitname>[- a-zA-Z0-9]+ { yylval->sValue = new Bu::String( yytext ); return tokSituationName; } 58<sitname>[-_ a-zA-Z0-9]+ { yylval->sValue = new Bu::String( yytext ); return tokSituationName; }
59<sitname>">>" { BEGIN( INITIAL ); } 59<sitname>">>" { BEGIN( INITIAL ); }
60<sitname>. REJECT; 60<sitname>. REJECT;
61 61
62"//"[^\n]* {} 62"//"[^\n]*\n? {}
63 63
64"/\*" { BEGIN( comment ); } 64"/*" { BEGIN( comment ); }
65<comment>"\*/" { BEGIN( INITIAL ); } 65<comment>"*/" { BEGIN( INITIAL ); }
66<comment>[\n\r] {}
66<comment>. {} 67<comment>. {}
67 68
68[a-zA-Z_][a-zA-Z0-9_]* { yylval->sValue = new Bu::String( yytext ); return tokIdent; } 69[a-zA-Z_][a-zA-Z0-9_]* { yylval->sValue = new Bu::String( yytext ); return tokIdent; }
@@ -112,4 +113,7 @@ null { return tokNull; }
112 yylloc->first_line = yylloc->last_line; 113 yylloc->first_line = yylloc->last_line;
113} 114}
114 115
116\r { }
117. { throw Bu::ExceptionBase("Invalid character found '%s'", yytext ); }
118
115%% 119%%