[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BIG BUG
Package bmrbin26 ;
Hello, try to compile this file
------------------------------------
Tokens
teor = ;
tlvp8104 = ;
tlvp8604 = ;
tlvp8605 = ;
tlvk0600 = ;
Productions
// xsap = teor ;
ssap = tlvp8104
suite03_ssap
suite04_ssap
;
suite03_ssap = {x2} tlvk0600 tlvp8605
| {x4} // You can also suppress the error by adding teor here
;
suite04_ssap = {x2} tlvk0600 tlvp8604
| {x4} teor
;
--------------------------
You will have a bug :
SableCC version 2.6
Copyright (C) 1997, 1998 Etienne Gagnon (gagnon@sable.mcgill.ca). All
rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Type 'java SableCC -license' to view the complete copyright notice and
license.
Verifying identifiers.
Generating token classes.
Generating production classes.
Generating alternative classes.
Generating analysis classes.
Generating utility classes.
Generating the lexer.
- Constructing NFA.
.........
- Constructing DFA.
..............
.
- resolving ACCEPT states.
Generating the parser.
..........
..........
..........
..
..shift/reduce conflict on TTlvk0600 in {
[PSsap = TTlvp8104 PSuite03Ssap PSuite04Ssap]:1:EOF,
[PSuite03Ssap = TTlvk0600 TTlvp8605]:0:TTeor,
[PSuite03Ssap = TTlvk0600 TTlvp8605]:0:TTlvk0600,
[PSuite03Ssap = ]:0:TTeor,
[PSuite03Ssap = ]:0:TTlvk0600
}
First problem :
My knowlegde is too poor to understand what "shift/reduce conflict on TTlvk0600"
means.
I am not an expert of compiler.
Second problem:
I do not understand how to read the error message (What is :1: ?)
Third problem:
Suppress the comment on the line "//xsap = teor ; " and compile no error ?
Fourth problem:
With the comment //xsap, replace "| {x4}" in suite03_ssap by "| {x4} teor". You
have no
error ! Why ?
Happy New year.
Best regards
Philippe.