Commit c51e9a6b authored by Dr. Michael Petter's avatar Dr. Michael Petter

support import static, cudos to Devrim Sahin

parent fe729fe8
Pipeline #1637 failed with stages
in 0 seconds
......@@ -92,7 +92,10 @@
<attribute name="Class-Path" value="java-cup-11b-runtime.jar" />
</manifest>
</jar>
<jar jarfile="${dist}/java-cup-11b-runtime.jar" basedir="${classes}" includes="java_cup/runtime/*">
<jar jarfile="${dist}/java-cup-11b-runtime.jar" basedir="${classes}" includes="java_cup/runtime/**">
<manifest>
<attribute name="Class-Path" value="commons-jxpath-1.3.jar" />
</manifest>
</jar>
<tar longfile="gnu" destfile="${dist}/java-cup-bin-11b-${cupversion}.tar.gz" compression="gzip">
<tarfileset dir="${dist}" username="ant" group="ant">
......
......@@ -241,7 +241,7 @@ scan with {:
/*----------------------------------------------------------------*/
terminal
PACKAGE, IMPORT, CODE, ACTION, PARSER, TERMINAL, NON, INIT, SCAN, WITH,
PACKAGE, IMPORT, STATIC ,CODE, ACTION, PARSER, TERMINAL, NON, INIT, SCAN, WITH,
START, SEMI, COMMA, STAR, DOT, COLON, COLON_COLON_EQUALS, BAR, PRECEDENCE,
LEFT, RIGHT, NONASSOC, PERCENT_PREC, LBRACK, RBRACK, NONTERMINAL, GT, LT,
QUESTION, SUPER, EXTENDS, CLASS;
......@@ -335,6 +335,17 @@ import_spec ::=
multipart_name = new String();
:}
SEMI
|
IMPORT STATIC
import_id
{:
/* save this import on the imports list */
emit.import_list.push(" static " + multipart_name);
/* reset the accumulated multipart name */
multipart_name = new String();
:}
SEMI
;
class_name ::=
......
......@@ -76,6 +76,7 @@ ident = ([:jletter:] | "_" ) ([:jletterdigit:] | [:jletter:] | "_" )*
"{:" { sb = new StringBuffer(); csline=yyline+1; cscolumn=yycolumn+1; yybegin(CODESEG); }
"package" { return symbol("PACKAGE",PACKAGE); }
"import" { return symbol("IMPORT",IMPORT); }
"static" { return symbol("STATIC",STATIC); }
"class" { return symbol("CLASS",CLASS); }
"code" { return symbol("CODE",CODE); }
"action" { return symbol("ACTION",ACTION); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment