#include <glib.h>
#include <string.h>
+#include "tree.h"
#include "parse.h"
#include "main.h"
#include "util.h"
yylval.id = g_strdup(yytext);
return NUMBER;
}
-<CLASS_CODE,CLASS_CODE_I>:?[A-Za-z_][A-Za-z0-9_]*(:[A-Za-z0-9_]*)+ {
+<CLASS_CODE,CLASS_CODE_I>[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);
+ return TYPETOKEN;
+ }
+<CLASS_CODE,CLASS_CODE_I>:[A-Za-z_][A-Za-z0-9_]*(:[A-Za-z0-9_]*)* {
+ /* this is for a classname with an empty namespace */
yylval.id = g_strdup(yytext);
return TYPETOKEN;
}