projects
/
iot2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding config file for sharing.
[iot2.git]
/
others
/
jflex
/
iotparser.jflex
diff --git
a/others/jflex/iotparser.jflex
b/others/jflex/iotparser.jflex
index a9e70d1778b85014307e60a0afdfa3eb129f2f07..6c33ece4d95af30bd748e90c5eec31da9cf055ec 100644
(file)
--- a/
others/jflex/iotparser.jflex
+++ b/
others/jflex/iotparser.jflex
@@
-52,7
+52,7
@@
import java_cup.runtime.ComplexSymbolFactory.Location;
%eofval}
%eofval}
-Ident = [a-zA-Z$_] [a-zA-Z0-9$_
<>
]*
+Ident = [a-zA-Z$_] [a-zA-Z0-9$_
\[\]
]*
new_line = \r|\n|\r\n;
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); }
"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()); }
/* names */
{Ident} { return symbol("Identifier",IDENT, yytext()); }
@@
-104,6
+106,8
@@
white_space = {new_line} | [ \t\f]
"," { return symbol("comma",COMMA); }
"(" { return symbol("(",LPAR); }
")" { return symbol(")",RPAR); }
"," { return symbol("comma",COMMA); }
"(" { return symbol("(",LPAR); }
")" { return symbol(")",RPAR); }
+"<" { return symbol("<",LANG); }
+">" { return symbol(">",RANG); }
"{" { return symbol("{",BEGIN); }
"}" { return symbol("}",END); }
"=" { return symbol("=",ASSIGN); }
"{" { return symbol("{",BEGIN); }
"}" { return symbol("}",END); }
"=" { return symbol("=",ASSIGN); }