Nece ni na listu da ode!
Izvinjavam se, poruku saljem u prilogu, jer nikako nije htela na listu!
--
If age or weaknes doe prohibyte bloudletting, you must use boxing.
- PHILIP BARROUGH, The Methode of Phisicke (1583)
Javlja mi se shift/reduce konflikt na neobicnom mestu i nema sanse da ga
razresim:
.
.
.
Type ::= IDENT:id {: RESULT = id; :};
rhs ::= NUMBER:n {: RESULT = n; :} | CHARCONST:c {: RESULT = c; :} ;
ConstDecl ::= FINAL Type:t IDENT:id EQUAL rhs:val
{: if(((String)t).equals("int"))
RESULT = new Obj(Obj.Con, id, Tab.intType);
else
if(((String)t).equals("char"))
RESULT = new Obj(Obj.Con, id, Tab.charType);
else
System.out.println("Greska u deklaraciji konstante!");
:} ;
.
.
.
CUP prijavi:
Opening files...
Parsing specification from standard input...
Checking specification...
Building parse tables...
Computing non-terminal nullability...
Computing first sets...
Building state machine...
Filling in tables...
*** Shift/Reduce conflict found in state #41
between NT$3 ::= (*)
and Type ::= (*) IDENT
under symbol IDENT
Resolved in favor of shifting.
Checking for non-reduced productions...
*** Production "NT$3 ::= " never reduced
*** More conflicts encountered than expected -- parser generation aborted
Closing files...
------- CUP v0.10k Parser Generation Summary -------
1 error and 2 warnings
41 terminals, 45 non-terminals, and 117 productions declared,
producing 230 unique parse states.
0 terminals declared but not used.
0 non-terminals declared but not used.
0 productions never reduced.
1 conflict detected (0 expected).
No code produced.
---------------------------------------------------- (v0.10k)
Inace sam pokusao sa savetima sa sajta, ali ne vredi. Ionako za Type
imam samo jednu smenu, pa nemam pojma otkud konflikt.
Ima li neko neki dobar savet?
Ivan
--
If age or weaknes doe prohibyte bloudletting, you must use boxing.
- PHILIP BARROUGH, The Methode of Phisicke (1583)
Javlja mi se shift/reduce konflikt na neobicnom mestu i nema sanse da ga
razresim:
.
.
.
Type ::= IDENT:id {: RESULT = id; :};
rhs ::= NUMBER:n {: RESULT = n; :} | CHARCONST:c {: RESULT = c; :} ;
ConstDecl ::= FINAL Type:t IDENT:id EQUAL rhs:val
{: if(((String)t).equals("int"))
RESULT = new Obj(Obj.Con, id, Tab.intType);
else
if(((String)t).equals("char"))
RESULT = new Obj(Obj.Con, id, Tab.charType);
else
System.out.println("Greska u deklaraciji konstante!");
:} ;
.
.
.
CUP prijavi:
Opening files...
Parsing specification from standard input...
Checking specification...
Building parse tables...
Computing non-terminal nullability...
Computing first sets...
Building state machine...
Filling in tables...
*** Shift/Reduce conflict found in state #41
between NT$3 ::= (*)
and Type ::= (*) IDENT
under symbol IDENT
Resolved in favor of shifting.
Checking for non-reduced productions...
*** Production "NT$3 ::= " never reduced
*** More conflicts encountered than expected -- parser generation aborted
Closing files...
------- CUP v0.10k Parser Generation Summary -------
1 error and 2 warnings
41 terminals, 45 non-terminals, and 117 productions declared,
producing 230 unique parse states.
0 terminals declared but not used.
0 non-terminals declared but not used.
0 productions never reduced.
1 conflict detected (0 expected).
No code produced.
---------------------------------------------------- (v0.10k)
Inace sam pokusao sa savetima sa sajta, ali ne vredi. Ionako za Type
imam samo jednu smenu, pa nemam pojma otkud konflikt.
Ima li neko neki dobar savet?
Ivan
Previous by date: Ima li leka? (ponovo)
Next by date: Ako ovo ne uspe, vise necu da pokusavam...
Previous by thread: Ima li leka? (ponovo) Next by thread: Ako ovo ne uspe, vise necu da pokusavam...
Previous by thread: Ima li leka? (ponovo) Next by thread: Ako ovo ne uspe, vise necu da pokusavam...