Java cup su eclipse

di il
1 risposte

Java cup su eclipse

Salve ragazzi, stò cercando di configurare correttamente Java Cup su Eclipse.
Ho installato il pacchetto di cup dal sito ufficiale, successivamente da eclipse ho fatto file new project Java Cup project e l'IDE mi ha generato un progetto in java cup.
Ho riscontrato già qui diversi problemi:
l'ide mi ha creato una classe java Driver.java dove all'interno c'è un Main, nel Main però è dichiarato ed usato un oggetto di tipo Parser, tale oggetto NON viene trovato all'interno del progetto(in sostanza mi dice importalo e mi da diverse scelte...ma nessuna utile)
Chiedendo un po in giro mi dicono che per prima cosa devo provare a compilare il file build.xml, quando però provo a compilare tale file mi vengono generati 100 errori di compilazione

Buildfile: C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\build.xml
generate:
      [cup] This is CUP v0.11b 20141204 (SVN rev 60)
      [cup] Authors : Scott E. Hudson, Frank Flannery, Michael Petter and C. Scott Ananian
      [cup] Bugreports to petter@cs.tum.edu
      [cup] checking, whether this run is necessary
      [cup] Parserfile and symbolfile are existing
      [cup] Parserfile C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java is actual
      [cup] SymbolfileC:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\sym.java is actual
      [cup] skipping generation of C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4/parser.cup
      [cup] use option force="true" to override
compile:
    [javac] Compiling 4 source files to C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\bin\cls
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Driver.java:3: error: package java_cup.runtime does not exist
    [javac] import java_cup.runtime.*;
    [javac] ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:4: error: package java_cup.runtime does not exist
    [javac] import java_cup.runtime.ComplexSymbolFactory;
    [javac]                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:5: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] import java_cup.runtime.ComplexSymbolFactory.Location;
    [javac]                                             ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:6: error: package java_cup.runtime does not exist
    [javac] import java_cup.runtime.Symbol;
    [javac]                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:17: error: package java_cup.runtime does not exist
    [javac] public class Lexer implements sym, java_cup.runtime.Scanner {
    [javac]                                                    ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:247: error: cannot find symbol
    [javac]     public Lexer(ComplexSymbolFactory sf, java.io.InputStream is){
    [javac]                  ^
    [javac]   symbol:   class ComplexSymbolFactory
    [javac]   location: class Lexer
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:251: error: cannot find symbol
    [javac] 	public Lexer(ComplexSymbolFactory sf, java.io.Reader reader){
    [javac] 	             ^
    [javac]   symbol:   class ComplexSymbolFactory
    [javac]   location: class Lexer
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:257: error: cannot find symbol
    [javac]     private ComplexSymbolFactory symbolFactory;
    [javac]             ^
    [javac]   symbol:   class ComplexSymbolFactory
    [javac]   location: class Lexer
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:260: error: cannot find symbol
    [javac]     public Symbol symbol(String name, int code){
    [javac]            ^
    [javac]   symbol:   class Symbol
    [javac]   location: class Lexer
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:266: error: cannot find symbol
    [javac]     public Symbol symbol(String name, int code, String lexem){
    [javac]            ^
    [javac]   symbol:   class Symbol
    [javac]   location: class Lexer
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:544: error: package java_cup.runtime does not exist
    [javac]   public java_cup.runtime.Symbol next_token() throws java.io.IOException {
    [javac]                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:13: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] import java_cup.runtime.ComplexSymbolFactory.Location;
    [javac]                                             ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:14: error: package java_cup.runtime does not exist
    [javac] import java_cup.runtime.XMLElement;
    [javac]                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:19: error: package java_cup.runtime does not exist
    [javac] public class Parser extends java_cup.runtime.lr_parser {
    [javac]                                             ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:29: error: package java_cup.runtime does not exist
    [javac]   public Parser(java_cup.runtime.Scanner s) {super(s);}
    [javac]                                 ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:32: error: package java_cup.runtime does not exist
    [javac]   public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}
    [javac]                                 ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:32: error: package java_cup.runtime does not exist
    [javac]   public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}
    [javac]                                                             ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:96: error: package java_cup.runtime does not exist
    [javac]     java_cup.runtime.lr_parser parser,
    [javac]                     ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:94: error: package java_cup.runtime does not exist
    [javac]   public java_cup.runtime.Symbol do_action(
    [javac]                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:136: error: package java_cup.runtime does not exist
    [javac]   public java_cup.runtime.Symbol scan()
    [javac]                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:161: error: package java_cup.runtime does not exist
    [javac]     java_cup.runtime.lr_parser CUP$Parser$parser,
    [javac]                     ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:159: error: package java_cup.runtime does not exist
    [javac]   public final java_cup.runtime.Symbol CUP$Parser$do_action_part00000000(
    [javac]                                ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:310: error: package java_cup.runtime does not exist
    [javac]     java_cup.runtime.lr_parser CUP$Parser$parser,
    [javac]                     ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:308: error: package java_cup.runtime does not exist
    [javac]   public final java_cup.runtime.Symbol CUP$Parser$do_action(
    [javac]                                ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:8: error: package java_cup.runtime does not exist
    [javac] import java_cup.runtime.*;
    [javac] ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Driver.java:9: error: cannot find symbol
    [javac] 		parser.parse();
    [javac] 		      ^
    [javac]   symbol:   method parse()
    [javac]   location: variable parser of type Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:262: error: cannot find symbol
    [javac] 						new Location(yyline+1,yycolumn+1, yychar), // -yylength()
    [javac] 						    ^
    [javac]   symbol:   class Location
    [javac]   location: class Lexer
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:263: error: cannot find symbol
    [javac] 						new Location(yyline+1,yycolumn+yylength(), yychar+yylength())
    [javac] 						    ^
    [javac]   symbol:   class Location
    [javac]   location: class Lexer
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:268: error: cannot find symbol
    [javac] 						new Location(yyline+1, yycolumn +1, yychar), 
    [javac] 						    ^
    [javac]   symbol:   class Location
    [javac]   location: class Lexer
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Lexer.java:269: error: cannot find symbol
    [javac] 						new Location(yyline+1,yycolumn+yylength(), yychar+yylength()), lexem);
    [javac] 						    ^
    [javac]   symbol:   class Location
    [javac]   location: class Lexer
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:36: error: cannot find symbol
    [javac]     unpackFromStrings(new String[] {
    [javac]     ^
    [javac]   symbol:   method unpackFromStrings(String[])
    [javac]   location: class Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:46: error: cannot find symbol
    [javac]     unpackFromStrings(new String[] {
    [javac]     ^
    [javac]   symbol:   method unpackFromStrings(String[])
    [javac]   location: class Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:71: error: cannot find symbol
    [javac]     unpackFromStrings(new String[] {
    [javac]     ^
    [javac]   symbol:   method unpackFromStrings(String[])
    [javac]   location: class Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:122: error: cannot find symbol
    [javac]   ComplexSymbolFactory f = new ComplexSymbolFactory();
    [javac]   ^
    [javac]   symbol:   class ComplexSymbolFactory
    [javac]   location: class Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:122: error: cannot find symbol
    [javac]   ComplexSymbolFactory f = new ComplexSymbolFactory();
    [javac]                                ^
    [javac]   symbol:   class ComplexSymbolFactory
    [javac]   location: class Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:123: error: cannot find symbol
    [javac]   symbolFactory = f;
    [javac]   ^
    [javac]   symbol:   variable symbolFactory
    [javac]   location: class Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:167: error: package java_cup.runtime does not exist
    [javac]       java_cup.runtime.Symbol CUP$Parser$result;
    [javac]                       ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:176: error: cannot find symbol
    [javac] 		Location exleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xleft;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:176: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location exleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xleft;
    [javac] 		                                                         ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:177: error: cannot find symbol
    [javac] 		Location exright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xright;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:177: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location exright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xright;
    [javac] 		                                                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:178: error: package java_cup.runtime does not exist
    [javac] 		Integer e = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;
    [javac] 		                                       ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:181: error: cannot find symbol
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr_list",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                         ^
    [javac]   symbol:   method getSymbolFactory()
    [javac]   location: variable parser of type Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:181: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr_list",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:181: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr_list",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                                                                                                 ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:189: error: cannot find symbol
    [javac] 		Location start_valxleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xleft;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:189: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location start_valxleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xleft;
    [javac] 		                                                                 ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:190: error: cannot find symbol
    [javac] 		Location start_valxright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xright;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:190: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location start_valxright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xright;
    [javac] 		                                                                  ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:191: error: package java_cup.runtime does not exist
    [javac] 		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;
    [javac] 		                                             ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:193: error: cannot find symbol
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("$START",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                         ^
    [javac]   symbol:   method getSymbolFactory()
    [javac]   location: variable parser of type Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:193: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("$START",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                     ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:193: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("$START",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                                                                                              ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:203: error: cannot find symbol
    [javac] 		Location exleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xleft;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:203: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location exleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xleft;
    [javac] 		                                                         ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:204: error: cannot find symbol
    [javac] 		Location exright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xright;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:204: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location exright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).xright;
    [javac] 		                                                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:205: error: package java_cup.runtime does not exist
    [javac] 		Integer e = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value;
    [javac] 		                                       ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:208: error: cannot find symbol
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr_list",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                         ^
    [javac]   symbol:   method getSymbolFactory()
    [javac]   location: variable parser of type Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:208: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr_list",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:208: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr_list",0, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                                                                                                 ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:216: error: cannot find symbol
    [javac] 		Location e1xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xleft;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:216: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e1xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xleft;
    [javac] 		                                                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:217: error: cannot find symbol
    [javac] 		Location e1xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xright;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:217: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e1xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xright;
    [javac] 		                                                           ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:218: error: package java_cup.runtime does not exist
    [javac] 		Integer e1 = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;
    [javac] 		                                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:219: error: cannot find symbol
    [javac] 		Location e2xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xleft;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:219: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e2xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xleft;
    [javac] 		                                                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:220: error: cannot find symbol
    [javac] 		Location e2xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xright;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:220: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e2xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xright;
    [javac] 		                                                           ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:221: error: package java_cup.runtime does not exist
    [javac] 		Integer e2 = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;
    [javac] 		                                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:224: error: cannot find symbol
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                         ^
    [javac]   symbol:   method getSymbolFactory()
    [javac]   location: variable parser of type Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:224: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                   ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:224: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                                                                                            ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:232: error: cannot find symbol
    [javac] 		Location e1xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xleft;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:232: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e1xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xleft;
    [javac] 		                                                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:233: error: cannot find symbol
    [javac] 		Location e1xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xright;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:233: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e1xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xright;
    [javac] 		                                                           ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:234: error: package java_cup.runtime does not exist
    [javac] 		Integer e1 = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;
    [javac] 		                                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:235: error: cannot find symbol
    [javac] 		Location e2xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xleft;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:235: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e2xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xleft;
    [javac] 		                                                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:236: error: cannot find symbol
    [javac] 		Location e2xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xright;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:236: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e2xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xright;
    [javac] 		                                                           ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:237: error: package java_cup.runtime does not exist
    [javac] 		Integer e2 = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;
    [javac] 		                                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:240: error: cannot find symbol
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                         ^
    [javac]   symbol:   method getSymbolFactory()
    [javac]   location: variable parser of type Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:240: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                   ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:240: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                                                                                            ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:248: error: cannot find symbol
    [javac] 		Location e1xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xleft;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:248: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e1xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xleft;
    [javac] 		                                                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:249: error: cannot find symbol
    [javac] 		Location e1xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xright;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:249: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e1xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).xright;
    [javac] 		                                                           ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:250: error: package java_cup.runtime does not exist
    [javac] 		Integer e1 = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value;
    [javac] 		                                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:251: error: cannot find symbol
    [javac] 		Location e2xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xleft;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:251: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e2xleft = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xleft;
    [javac] 		                                                          ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:252: error: cannot find symbol
    [javac] 		Location e2xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xright;
    [javac] 		^
    [javac]   symbol:   class Location
    [javac]   location: class Parser.CUP$Parser$actions
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:252: error: package java_cup.runtime.ComplexSymbolFactory does not exist
    [javac] 		Location e2xright = ((java_cup.runtime.ComplexSymbolFactory.ComplexSymbol)CUP$Parser$stack.peek()).xright;
    [javac] 		                                                           ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:253: error: package java_cup.runtime does not exist
    [javac] 		Integer e2 = (Integer)((java_cup.runtime.Symbol) CUP$Parser$stack.peek()).value;
    [javac] 		                                        ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:256: error: cannot find symbol
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                         ^
    [javac]   symbol:   method getSymbolFactory()
    [javac]   location: variable parser of type Parser
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:256: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                   ^
    [javac] C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\src\cup\example\Parser.java:256: error: package java_cup.runtime does not exist
    [javac]               CUP$Parser$result = parser.getSymbolFactory().newSymbol("expr",1, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)), ((java_cup.runtime.Symbol)CUP$Parser$stack.peek()), RESULT);
    [javac]                                                                                                                                                                            ^
    [javac] 100 errors

BUILD FAILED
C:\Users\Giordano Giammaria\Desktop\Compilatori\Esercizio4\build.xml:31: Compile failed; see the compiler error output for details.

Total time: 2 seconds
presumo di non aver importato correttamente qualcosa, o di non aver ben installato correttamente qualcosa.
Qualcuno di voi può aiutarmi?
Grazie!

1 Risposte

  • Re: Java cup su eclipse

    Ragazzi ho risolto,
    per chiunque possa interessare il mio procedimento è stato quello di assicurarmi che la variabile d'ambiente JAVA_HOME puntasse nella mia jdk(C:/PERCORSO/jdk),successivamente sono andato (Da eclipse) su windows prefercenes java variable classpath e ho settato la JAVA_HOME anche li
    (C:\percorso\jdk\) poi ho fatto build project(e mi ha generato un errore...) ho fatto refresh al progetto e sono comparse le classi di cui avevo bisogno ho compilato e tutto è andato liscio.
    il post si può chiudere.
Devi accedere o registrarti per scrivere nel forum
1 risposte