PS C:\Users\matti> javac -version
javac 19
PS C:\Users\matti> java -version
java version "19" 2022-09-20
Java(TM) SE Runtime Environment (build 19+36-2238)
Java HotSpot(TM) 64-Bit Server VM (build 19+36-2238, mixed mode, sharing)
compilazione di java_cup
PS C:\Program Files\FLC_Tools\java_cup_v11_draw_tree\java_cup> javac *.java runtime\*.java ..\StdDraw.java
production.java:157: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
_all.put(new Integer(_index),this);
^
production.java:230: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
return (production) _all.get(new Integer(indx));
^
non_terminal.java:43: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
_all_by_index.put(new Integer(_index), this);
^
non_terminal.java:93: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
Integer the_indx = new Integer(indx);
^
terminal.java:48: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
_all_by_index.put(new Integer(_index), this);
^
terminal.java:117: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
Integer the_indx = new Integer(indx);
^
emit.java:514: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
pre("do_action_part")+ String.format("%08d",new Integer(instancecounter)) +"(");
^
emit.java:704: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
out.println(" return " + pre("do_action_part")+ String.format("%08d",new Integer(0))+"(");
^
emit.java:729: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
out.println(" return " + pre("do_action_part")+ String.format("%08d",new Integer(instancecounter))+"(");
^
emit.java:790: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
pre("do_action_part")+ String.format("%08d",new Integer(instancecounter)) +"(");
^
emit.java:957: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
out.println(" return " + pre("do_action_part")+ String.format("%08d",new Integer(0))+"(");
^
emit.java:982: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
out.println(" return " + pre("do_action_part")+ String.format("%08d",new Integer(instancecounter))+"(");
^
emit.java:1634: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
pre("do_action_part")+ String.format("%08d",new Integer(instancecounter)) +"(");
^
emit.java:1756: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
out.println(" return " + pre("do_action_part")+ String.format("%08d",new Integer(0))+"(");
^
emit.java:1781: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
out.println(" return " + pre("do_action_part")+ String.format("%08d",new Integer(instancecounter))+"(");
^
lalr_item_set.java:347: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
hashcode_cache = new Integer(result);
^
runtime\lr_parser.java:480: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
ret.add(new Integer(row[i]));
^
runtime\DefaultSymbolFactory.java:29: warning: [dep-ann] deprecated item is not annotated with @Deprecated
public DefaultSymbolFactory(){
^
runtime\virtual_parse_stack.java:93: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
vstack.push(new Integer(stack_sym.parse_state));
^
runtime\virtual_parse_stack.java:140: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
vstack.push(new Integer(state_num));
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
20 warnings
PS C:\Users\matti\workspace\MattiaRiola\FLC-practice\exClass-2> jflex scanner.jflex
Reading "scanner.jflex"
Constructing NFA : 32 states in NFA
Converting NFA to DFA :
............
14 states before minimization, 10 states in minimized DFA
Old file "Yylex.java" saved as "Yylex.java~"
Writing code to "Yylex.java"
PS C:\Users\matti\workspace\MattiaRiola\FLC-practice\exClass-2> javac *.java
Main.java:10: error: cannot find symbol
parser p = new parser(l);
^
symbol: class parser
location: class Main
Main.java:10: error: cannot find symbol
parser p = new parser(l);
^
symbol: class parser
location: class Main
Yylex.java:624: error: cannot find symbol
{ return new java_cup.runtime.Symbol(sym.EOF); }
^
symbol: variable sym
location: class Yylex
Yylex.java:639: error: cannot find symbol
{ System.out.println("OPEN BRACKET");return new Symbol(sym.OBRACKET);
^
symbol: variable sym
location: class Yylex
Yylex.java:644: error: cannot find symbol
{ System.out.println("CLOSE BRACKET");return new Symbol(sym.CBRACKET);
^
symbol: variable sym
location: class Yylex
Yylex.java:649: error: cannot find symbol
{ System.out.println("PLUS");return new Symbol(sym.PLUS);
^
symbol: variable sym
location: class Yylex
Yylex.java:654: error: cannot find symbol
{ System.out.println("MINUS");return new Symbol(sym.MINUS);
^
symbol: variable sym
location: class Yylex
Yylex.java:659: error: cannot find symbol
{ System.out.println("NUMBER:"+yytext());return new Symbol(sym.NUMBER);
^
symbol: variable sym
location: class Yylex
Yylex.java:664: error: cannot find symbol
{ System.out.println("EQUAL");return new Symbol(sym.EQUAL);
^
symbol: variable sym
location: class Yylex
9 errors
Problemi con l'installazione di jflex java_cup
Ho seguito il video su youtube e la guida dal suo sito
installazione di java
sembra funzionare
compilazione di java_cup
Le variabili d'ambiente
sembrano essere settate correttamente:
Esecuzione dell'esempio
Permessi cartella