X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/38fac18bf81df672821ebbac4130ce41f0a6c61f..96e3b08533ea7fc6bd4b4de58849da0dec72411c:/src/lexer.l diff --git a/src/lexer.l b/src/lexer.l index 0832621..b25574b 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -260,6 +260,7 @@ REJECT; \/\/.*$ { add_to_cbuf(yytext); /*comment, ignore*/ } \/\/.*$ { ; /*comment, ignore*/ } \/\/.*$ { ; /*comment, ignore*/ } +\/\/.*$ { ; /*comment, ignore*/ } \/\* {BEGIN(COMMENT); before_comment = INITIAL; } \/\* { add_to_cbuf(yytext); @@ -268,6 +269,7 @@ REJECT; } \/\* {BEGIN(COMMENT); before_comment = CLASS_CODE; } \/\* {BEGIN(COMMENT); before_comment = CLASS_CODE_I; } +\/\* {BEGIN(COMMENT); before_comment = PROPERTY_CODE_I; } \*\/ { if(before_comment == C_CODE) add_to_cbuf(yytext); BEGIN(before_comment); @@ -530,6 +532,15 @@ flags { return FLAGS; } yylval.id = g_strdup(yytext); return NUMBER; } +[A-Za-z_][A-Za-z0-9_]*(::[A-Za-z0-9_]*)+ { + /* This is cpp kind of token thingie */ + if (for_cpp) { + yylval.id = g_strdup(yytext); + return TOKEN; + } else { + REJECT; + } + } [A-Za-z_][A-Za-z0-9_]*(:[A-Za-z0-9_]*)+ { /* this one is for a classname with a namespace */ yylval.id = g_strdup(yytext);