Torna indietro   Hardware Upgrade Forum > Software > Programmazione

DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker
DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker
Analizziamo nel dettaglio DJI RS 5, l'ultimo arrivato della famiglia Ronin progettato per videomaker solisti e piccoli studi. Tra tracciamento intelligente migliorato e ricarica ultra rapida, scopriamo come questo gimbal eleva la qualità delle produzioni.
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming
AMD Ryzen 7 9850X3D è la nuova CPU gaming di riferimento grazie alla 3D V-Cache di seconda generazione e frequenze fino a 5,6 GHz. Nei test offre prestazioni superiori a 9800X3D e 7800X3D, confermando la leadership AMD nel gaming su PC.
Le soluzioni FSP per il 2026: potenza e IA al centro
Le soluzioni FSP per il 2026: potenza e IA al centro
In occasione del Tech Tour 2025 della European Hardware Association abbiamo incontrato a Taiwan FSP, azienda impegnata nella produzione di alimentatori, chassis e soluzioni di raffreddamento tanto per clienti OEM come a proprio marchio. Potenze sempre più elevate negli alimentatori per far fronte alle necessità delle elaborazioni di intelligenza artificiale.
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 30-07-2013, 23:27   #1
vfldj
Member
 
Iscritto dal: Oct 2012
Messaggi: 59
ANTLR - Problema durante compilazione

Ciao a tutti, devo usare antlr per l'università ma non so se l'ho installato bene.
Premetto che sto usando Windows 7 64 bit.
Ho scaricato da http://www.antlr3.org/download/antlr-3.5-complete.jar la versione 3.5 di antlr e da http://www.antlr3.org/download/antlrworks-1.4.2.jar antlrwork 1.4.2.
Poi ho messo questi due file in una cartella C:\Javalib ed ho impostato il classpath aggiungendo C:\Javalib\antlr-3.5-complete.jar; alla variabile d'ambiente Path (è la stessa a cui ho aggiunto anche il percorso delle jkd di java).
Poi, per esempio, ho provato a seguire i passi descritti qui http://www.antlr.org/wiki/display/AN...ion+evaluator.
Quindi ho copiato il testo della grammatica in un file Expr.g e l'ho salvato sempre nella cartella C:\Javalib.
Poi dal prompt dei comandi ho eseguito (trovandomi in C:\Javalib) java -cp antlr-3.5-complete.jar org.antlr.Tool Expr.g ed effettivamente mi ha prodotto i 3 file ExprLexer.java, ExprParser.java e Expr.tokens.
Fin qui quindi tutto bene...
Ora iniziano i problemi.
Ho poi copiato in un file java il programmino Test.java e ho provato a compilarlo eseguendo dal prompt dei comandi (dopo essermi posizionato nella cartella C:\Javalib) javac Test.java ExprLexer.java ExprParser.java ma mi da errore, anzi.. mi da 100 errori.
Ho provato allora scrivendo sul prompt javac -cp .:.\antlr-3.5-complete.jar Test.java ExprLexer.java ExprParser.java e javac -cp .;C:\antlr-3.5-complete.jar Test.java ExprLexer.java ExprParser.java ma niente, sempre gli stessi 100 errori.

Ho installato bene tutto? Le variabili d'ambiente sono corrette? Come faccio a compilare?

Grazie
vfldj è offline   Rispondi citando il messaggio o parte di esso
Old 31-07-2013, 10:12   #2
mone.java
Senior Member
 
L'Avatar di mone.java
 
Iscritto dal: May 2008
Città: Seattle (WA)
Messaggi: 306
Quali Errori ti da ?
__________________
"Considerate la vostra semenza fatti non foste a viver come bruti ma per seguir virtute e canoscenza"
mone.java è offline   Rispondi citando il messaggio o parte di esso
Old 31-07-2013, 16:37   #3
vfldj
Member
 
Iscritto dal: Oct 2012
Messaggi: 59
Grazie per la risposta. Ecco gli errori:

location: class ExprParser
ExprParser.java:434: error: cannot find symbol
public static final BitSet FOLLOW_INT_in_atom230 = new BitSet(new long[]
{0x0000000000000002L});
^
symbol: class BitSet
location: class ExprParser
ExprParser.java:435: error: cannot find symbol
public static final BitSet FOLLOW_ID_in_atom242 = new BitSet(new long[]{
0x0000000000000002L});
^
symbol: class BitSet
location: class ExprParser
ExprParser.java:436: error: cannot find symbol
public static final BitSet FOLLOW_8_in_atom262 = new BitSet(new long[]{0
x0000000000000130L});
^
symbol: class BitSet
location: class ExprParser
ExprParser.java:437: error: cannot find symbol
public static final BitSet FOLLOW_expr_in_atom264 = new BitSet(new long[
]{0x0000000000000200L});
^
symbol: class BitSet
location: class ExprParser
ExprParser.java:438: error: cannot find symbol
public static final BitSet FOLLOW_9_in_atom266 = new BitSet(new long[]{0
x0000000000000002L});
^
symbol: class BitSet
location: class ExprParser
Test.java:5: error: cannot find symbol
ANTLRInputStream input = new ANTLRInputStream(System.in);
^
symbol: class ANTLRInputStream
location: class Test
Test.java:5: error: cannot find symbol
ANTLRInputStream input = new ANTLRInputStream(System.in);
^
symbol: class ANTLRInputStream
location: class Test
Test.java:7: error: cannot find symbol
CommonTokenStream tokens = new CommonTokenStream(lexer);
^
symbol: class CommonTokenStream
location: class Test
Test.java:7: error: cannot find symbol
CommonTokenStream tokens = new CommonTokenStream(lexer);
^
symbol: class CommonTokenStream
location: class Test
ExprLexer.java:25: error: cannot find symbol
return new Lexer[] {};
^
symbol: class Lexer
location: class ExprLexer
ExprLexer.java:30: error: cannot find symbol
this(input, new RecognizerSharedState());
^
symbol: class RecognizerSharedState
location: class ExprLexer
ExprLexer.java:35: error: method does not override or implement a method from a
supertype
@Override public String getGrammarFileName() { return "Expr.g"; }
^
ExprLexer.java:41: error: cannot find symbol
int _channel = DEFAULT_TOKEN_CHANNEL;
^
symbol: variable DEFAULT_TOKEN_CHANNEL
location: class ExprLexer
ExprLexer.java:45: error: cannot find symbol
match('(');
^
symbol: method match(char)
location: class ExprLexer
ExprLexer.java:48: error: cannot find symbol
state.type = _type;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:49: error: cannot find symbol
state.channel = _channel;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:61: error: cannot find symbol
int _channel = DEFAULT_TOKEN_CHANNEL;
^
symbol: variable DEFAULT_TOKEN_CHANNEL
location: class ExprLexer
ExprLexer.java:65: error: cannot find symbol
match(')');
^
symbol: method match(char)
location: class ExprLexer
ExprLexer.java:68: error: cannot find symbol
state.type = _type;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:69: error: cannot find symbol
state.channel = _channel;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:81: error: cannot find symbol
int _channel = DEFAULT_TOKEN_CHANNEL;
^
symbol: variable DEFAULT_TOKEN_CHANNEL
location: class ExprLexer
ExprLexer.java:85: error: cannot find symbol
match('*');
^
symbol: method match(char)
location: class ExprLexer
ExprLexer.java:88: error: cannot find symbol
state.type = _type;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:89: error: cannot find symbol
state.channel = _channel;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:101: error: cannot find symbol
int _channel = DEFAULT_TOKEN_CHANNEL;
^
symbol: variable DEFAULT_TOKEN_CHANNEL
location: class ExprLexer
ExprLexer.java:105: error: cannot find symbol
match('+');
^
symbol: method match(char)
location: class ExprLexer
ExprLexer.java:108: error: cannot find symbol
state.type = _type;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:109: error: cannot find symbol
state.channel = _channel;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:121: error: cannot find symbol
int _channel = DEFAULT_TOKEN_CHANNEL;
^
symbol: variable DEFAULT_TOKEN_CHANNEL
location: class ExprLexer
ExprLexer.java:125: error: cannot find symbol
match('-');
^
symbol: method match(char)
location: class ExprLexer
ExprLexer.java:128: error: cannot find symbol
state.type = _type;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:129: error: cannot find symbol
state.channel = _channel;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:141: error: cannot find symbol
int _channel = DEFAULT_TOKEN_CHANNEL;
^
symbol: variable DEFAULT_TOKEN_CHANNEL
location: class ExprLexer
ExprLexer.java:145: error: cannot find symbol
match('=');
^
symbol: method match(char)
location: class ExprLexer
ExprLexer.java:148: error: cannot find symbol
state.type = _type;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:149: error: cannot find symbol
state.channel = _channel;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:161: error: cannot find symbol
int _channel = DEFAULT_TOKEN_CHANNEL;
^
symbol: variable DEFAULT_TOKEN_CHANNEL
location: class ExprLexer
ExprLexer.java:170: error: cannot find symbol
int LA1_0 = input.LA(1);
^
symbol: variable input
location: class ExprLexer
ExprLexer.java:179: error: cannot find symbol
if ( (input.LA(1) >= 'A' && input.LA(1)
<= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
^
symbol: variable input
location: class ExprLexer
ExprLexer.java:179: error: cannot find symbol
if ( (input.LA(1) >= 'A' && input.LA(1)
<= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
^
symbol: variable input
location: class ExprLexer
ExprLexer.java:179: error: cannot find symbol
if ( (input.LA(1) >= 'A' && input.LA(1)
<= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {

^
symbol: variable input
location: class ExprLexer
ExprLexer.java:179: error: cannot find symbol
if ( (input.LA(1) >= 'A' && input.LA(1)
<= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {

^
symbol: variable input
location: class ExprLexer
ExprLexer.java:180: error: cannot find symbol
input.consume();
^
symbol: variable input
location: class ExprLexer
ExprLexer.java:183: error: cannot find symbol
MismatchedSetException mse = new
MismatchedSetException(null,input);
^
symbol: class MismatchedSetException
location: class ExprLexer
ExprLexer.java:183: error: cannot find symbol
MismatchedSetException mse = new
MismatchedSetException(null,input);

^
symbol: class MismatchedSetException
location: class ExprLexer
ExprLexer.java:183: error: cannot find symbol
MismatchedSetException mse = new
MismatchedSetException(null,input);

^
symbol: variable input
location: class ExprLexer
ExprLexer.java:192: error: cannot find symbol
EarlyExitException eee = new EarlyExitEx
ception(1, input);
^
symbol: class EarlyExitException
location: class ExprLexer
ExprLexer.java:192: error: cannot find symbol
EarlyExitException eee = new EarlyExitEx
ception(1, input);
^
symbol: class EarlyExitException
location: class ExprLexer
ExprLexer.java:192: error: cannot find symbol
EarlyExitException eee = new EarlyExitEx
ception(1, input);

^
symbol: variable input
location: class ExprLexer
ExprLexer.java:200: error: cannot find symbol
state.type = _type;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:201: error: cannot find symbol
state.channel = _channel;
^
symbol: variable state
location: class ExprLexer
ExprLexer.java:213: error: cannot find symbol
int _channel = DEFAULT_TOKEN_CHANNEL;
^
symbol: variable DEFAULT_TOKEN_CHANNEL
location: class ExprLexer
ExprLexer.java:222: error: cannot find symbol
int LA2_0 = input.LA(1);
^
symbol: variable input
location: class ExprLexer
ExprLexer.java:231: error: cannot find symbol
if ( (input.LA(1) >= '0' && input.LA(1)
<= '9') ) {
^
symbol: variable input
location: class ExprLexer
ExprLexer.java:231: error: cannot find symbol
if ( (input.LA(1) >= '0' && input.LA(1)
<= '9') ) {
^
symbol: variable input
location: class ExprLexer
100 errors

C:\Javalib>
vfldj è offline   Rispondi citando il messaggio o parte di esso
Old 31-07-2013, 17:04   #4
mone.java
Senior Member
 
L'Avatar di mone.java
 
Iscritto dal: May 2008
Città: Seattle (WA)
Messaggi: 306
È evidente che ti manca qualcosa premetto che non ho mai usato antlr, dunque il primo passo che hai fatto, ovvero mettere la libreria nella variabile d'ambiante Path, non ha molto senso, anzi direi che è inutile. In generale in Java quando devi includere delle librerie in un programma fallo dal comando che esegue il programma stesso usando, come hai fatto tu:

Codice:
javac -cp ecc..
Detto questo noto che innanzitutto la seconda libreria che hai linkato non è mai stata usata (antlrwork 1.4.2.) e penso che nemmeno sia utile, poi per compilare dai questo comando:

Codice:
javac -cp .:antlr-3.5-complete.jar Test.java ExprLexer.java ExprParser.java
e per eseguire:

Codice:
java -cp .:antlr-3.5-complete.jar Test
inserisci la tua espressione e per dare <EOF> premi Ctrl+D
__________________
"Considerate la vostra semenza fatti non foste a viver come bruti ma per seguir virtute e canoscenza"
mone.java è offline   Rispondi citando il messaggio o parte di esso
Old 31-07-2013, 17:20   #5
vfldj
Member
 
Iscritto dal: Oct 2012
Messaggi: 59
Quote:
Originariamente inviato da mone.java Guarda i messaggi
È evidente che ti manca qualcosa premetto che non ho mai usato antlr, dunque il primo passo che hai fatto, ovvero mettere la libreria nella variabile d'ambiante Path, non ha molto senso, anzi direi che è inutile. In generale in Java quando devi includere delle librerie in un programma fallo dal comando che esegue il programma stesso usando, come hai fatto tu:

Codice:
javac -cp ecc..
Detto questo noto che innanzitutto la seconda libreria che hai linkato non è mai stata usata (antlrwork 1.4.2.) e penso che nemmeno sia utile, poi per compilare dai questo comando:

Codice:
javac -cp .:antlr-3.5-complete.jar Test.java ExprLexer.java ExprParser.java
e per eseguire:

Codice:
java -cp .:antlr-3.5-complete.jar Test
inserisci la tua espressione e per dare <EOF> premi Ctrl+D
Ho tolto dalla variabile d'ambiente il path C:\Javalib, ho provato a compilare col comando che hai scritto tu ma mi da sempre i 100 errori. Ho capito male io?
Mi sento un pò rinco..
vfldj è offline   Rispondi citando il messaggio o parte di esso
Old 31-07-2013, 18:33   #6
mone.java
Senior Member
 
L'Avatar di mone.java
 
Iscritto dal: May 2008
Città: Seattle (WA)
Messaggi: 306
L'unica differenza è che io ho linux e te windows quindi magari cambia qualcosa nella sintassi del parametro -cp.... Investiga, su quello..
__________________
"Considerate la vostra semenza fatti non foste a viver come bruti ma per seguir virtute e canoscenza"
mone.java è offline   Rispondi citando il messaggio o parte di esso
Old 31-07-2013, 19:00   #7
mone.java
Senior Member
 
L'Avatar di mone.java
 
Iscritto dal: May 2008
Città: Seattle (WA)
Messaggi: 306
L'unica differenza è che io ho linux e te windows quindi magari cambia qualcosa nella sintassi del parametro -cp.... Investiga, su quello..
__________________
"Considerate la vostra semenza fatti non foste a viver come bruti ma per seguir virtute e canoscenza"
mone.java è offline   Rispondi citando il messaggio o parte di esso
Old 31-07-2013, 19:00   #8
vfldj
Member
 
Iscritto dal: Oct 2012
Messaggi: 59
Quote:
Originariamente inviato da mone.java Guarda i messaggi
L'unica differenza è che io ho linux e te windows quindi magari cambia qualcosa nella sintassi del parametro -cp.... Investiga, su quello..
va bene, grazie!
vfldj è offline   Rispondi citando il messaggio o parte di esso
Old 01-08-2013, 20:39   #9
vfldj
Member
 
Iscritto dal: Oct 2012
Messaggi: 59
Non sono ancora riuscito a risolvere...
vfldj è offline   Rispondi citando il messaggio o parte di esso
Old 02-08-2013, 09:11   #10
mone.java
Senior Member
 
L'Avatar di mone.java
 
Iscritto dal: May 2008
Città: Seattle (WA)
Messaggi: 306
Non so proprio come aiutarti, windows non lo uso da tempi assai remoti (meno male ).. quindi dovresti chiedere a qualcuno che usa windows come si imposta il classpath di java (anche se a rigor di logica dovrebbe essere uguale a linux).... Se non riesci cmq posso provare con una macchina virtuale windows....
__________________
"Considerate la vostra semenza fatti non foste a viver come bruti ma per seguir virtute e canoscenza"
mone.java è offline   Rispondi citando il messaggio o parte di esso
Old 04-08-2013, 16:58   #11
vfldj
Member
 
Iscritto dal: Oct 2012
Messaggi: 59
Quote:
Originariamente inviato da mone.java Guarda i messaggi
Non so proprio come aiutarti, windows non lo uso da tempi assai remoti (meno male ).. quindi dovresti chiedere a qualcuno che usa windows come si imposta il classpath di java (anche se a rigor di logica dovrebbe essere uguale a linux).... Se non riesci cmq posso provare con una macchina virtuale windows....
Se per te non è un grosso problema provare con una macchina virtuale, mi faresti un enorme favore
vfldj è offline   Rispondi citando il messaggio o parte di esso
Old 06-08-2013, 18:14   #12
mone.java
Senior Member
 
L'Avatar di mone.java
 
Iscritto dal: May 2008
Città: Seattle (WA)
Messaggi: 306
SI trattava di mettere il ; alla fine dell'argomento -cp:

Codice:
java -cp antlr-3.5-complete.jar; Test
Provato su windows XP 32-bit java 1.7.0_15...

__________________
"Considerate la vostra semenza fatti non foste a viver come bruti ma per seguir virtute e canoscenza"
mone.java è offline   Rispondi citando il messaggio o parte di esso
Old 06-08-2013, 21:20   #13
vfldj
Member
 
Iscritto dal: Oct 2012
Messaggi: 59
Quote:
Originariamente inviato da mone.java Guarda i messaggi
SI trattava di mettere il ; alla fine dell'argomento -cp:

Codice:
java -cp antlr-3.5-complete.jar; Test
Provato su windows XP 32-bit java 1.7.0_15...

Grazie infinite, gentilissimo!
vfldj è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


DJI RS 5: stabilizzazione e tracking intelligente per ogni videomaker DJI RS 5: stabilizzazione e tracking intelligent...
AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequenze al top per il gaming AMD Ryzen 7 9850X3D: Zen 5, 3D V-Cache e frequen...
Le soluzioni FSP per il 2026: potenza e IA al centro Le soluzioni FSP per il 2026: potenza e IA al ce...
AWS annuncia European Sovereign Cloud, il cloud sovrano per convincere l'Europa AWS annuncia European Sovereign Cloud, il cloud ...
Redmi Note 15 Pro+ 5G: autonomia monstre e display luminoso, ma il prezzo è alto Redmi Note 15 Pro+ 5G: autonomia monstre e displ...
Super sconti fai da te: accessori Bosch ...
Musk prepara la super-fusione: SpaceX, x...
Samsung va controcorrente? Galaxy S26 Ul...
Apple, boom di iPhone e Servizi: è...
Speciale TV economiche in offerta su Ama...
L'app di GeForce NOW per Linux è ...
Apple vuole integrare Direct-to-Cell di ...
Snap è stata accusata di aver usa...
Nothing non realizzerà un nuovo t...
Samsung spoilera una novità del f...
SpaceX sta provando le piastrelle isolan...
Il National Reconnaissance Office statun...
Volkswagen avvia la produzione su CEA: c...
La crisi delle memorie non influenzer&ag...
MoM-z14 è la galassia scoperta da...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 09:38.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v