]> git.draconx.ca Git - gob-dx.git/blobdiff - src/lexer.l
Release 0.93.1
[gob-dx.git] / src / lexer.l
index ddbd9516feb4132acfba936ceabce8744e049d5f..14f699005f6160396f8861a96221b148e8ada9b9 100644 (file)
@@ -24,6 +24,7 @@
 #include <glib.h>
 #include <string.h>
 
+#include "tree.h"
 #include "parse.h"
 #include "main.h"
 #include "util.h"
@@ -381,7 +382,13 @@ class              {
                        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;
                }