#include <glib.h>
#include <string.h>
+#include "tree.h"
#include "parse.h"
#include "main.h"
#include "util.h"
if(before_comment == C_CODE) add_to_cbuf(yytext);
}
+^\%(a|all)\{ {
+ BEGIN(C_CODE);
+ parenth_depth = 1;
+ class_after_c = FALSE;
+ code_type = ACODE;
+ clear_cbuf();
+ ccode_line = line_no;
+ }
+^\%(at|alltop)\{ {
+ BEGIN(C_CODE);
+ parenth_depth = 1;
+ class_after_c = FALSE;
+ code_type = ATCODE;
+ clear_cbuf();
+ ccode_line = line_no;
+ }
+
^\%(ht|headertop)\{ {
BEGIN(C_CODE);
parenth_depth = 1;
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;
}