Adding config file for sharing.
[iot2.git] / others / jflex / iotparser.jflex
index 239c81dcbba6859e129d59078309a523f0b0d883..6c33ece4d95af30bd748e90c5eec31da9cf055ec 100644 (file)
@@ -52,7 +52,7 @@ import java_cup.runtime.ComplexSymbolFactory.Location;
 %eofval}
 
 
-Ident = [a-zA-Z$_] [a-zA-Z0-9$_]*
+Ident = [a-zA-Z$_] [a-zA-Z0-9$_\[\]]*
 
 new_line = \r|\n|\r\n;
 
@@ -83,6 +83,8 @@ white_space = {new_line} | [ \t\f]
 "requires"        { return symbol("requires",REQUIRES); }
 "with"            { return symbol("with",WITH); }
 "as"              { return symbol("as",AS); }
+"enum"            { return symbol("enum",ENUM); }
+"struct"          { return symbol("struct",STRUCT); }
 
 /* names */
 {Ident}           { return symbol("Identifier",IDENT, yytext()); }