Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with bison version 3.8.2 on Ubuntu 22.04 #55

Open
rsprengel opened this issue Jan 30, 2023 · 2 comments
Open

Problem with bison version 3.8.2 on Ubuntu 22.04 #55

rsprengel opened this issue Jan 30, 2023 · 2 comments

Comments

@rsprengel
Copy link

When I try to build esnacc from source I ran into a problem with bison:

bison -y -v -t -d -r all -o compiler/core/y.tab.c ./compiler/core/y.tab.y
./compiler/core/y.tab.y: warning: 65 shift/reduce conflicts [-Wconflict-sr]
./compiler/core/y.tab.y: warning: 2 reduce/reduce conflicts [-Wconflict-rr]
./compiler/core/y.tab.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
time limit exceeded: 6.000000
time limit exceeded: 6.000000
....

the process didn't stop and run forever with this time limit exceeded messages. Maybe this is an incompatibility with bison version 3.8.2 because on Ubuntu 20.04 (with bison 3.5.1) it is running correctly (with the warnings but without the exceeded messages).

@rsprengel
Copy link
Author

perhaps interisting are the messages in y.output (at the end):

shift/reduce conflict on token LCASEFIRST_IDENT_SYM:
  456 MtsasExtensionMacroType: EXTENSION_SYM •
  271 identifier: • LCASEFIRST_IDENT_SYM
  First example: ModuleIdentifier DEFINITIONS_SYM TagDefault $@1 ExtensionDefault GETS_SYM BEGIN_SYM OptionalSnaccNamespace Exports Imports typereference GETS_SYM SnaccDirectives LineNo EXTENSION_SYM • LCASEFIRST_IDENT_SYM Type MtsasExtDefaultVal MtsasExtCritical SnaccDirectives AssignmentOrError END_SYM $end
  Shift derivation
    $accept
    ↳ 0: ModuleDefinition                                                                                                                                                                                                                                                                                                                                                     $end
         ↳ 3: ModuleIdentifier DEFINITIONS_SYM TagDefault $@1 ExtensionDefault GETS_SYM BEGIN_SYM OptionalSnaccNamespace ModuleBody                                                                                                                                                                                                                                   END_SYM
                                                                                                                         ↳ 15: Exports Imports AssignmentList
                                                                                                                                               ↳ 37: AssignmentList                                                                                                                                                                                 AssignmentOrError
                                                                                                                                                     ↳ 38: AssignmentOrError
                                                                                                                                                           ↳ 39: TypeAssignment
                                                                                                                                                                 ↳ 50: typereference GETS_SYM SnaccDirectives LineNo Type                                                                                                           SnaccDirectives
                                                                                                                                                                                                                     ↳ 54: DefinedMacroType
                                                                                                                                                                                                                           ↳ 352: MtsasExtensionMacroType
                                                                                                                                                                                                                                  ↳ 455: EXTENSION_SYM NamedType                                MtsasExtDefaultVal MtsasExtCritical
                                                                                                                                                                                                                                                       ↳ 81: identifier                    Type
                                                                                                                                                                                                                                                             ↳ 271: • LCASEFIRST_IDENT_SYM
  Second example: ModuleIdentifier DEFINITIONS_SYM TagDefault $@1 ExtensionDefault GETS_SYM BEGIN_SYM OptionalSnaccNamespace Exports Imports typereference GETS_SYM SnaccDirectives LineNo EXTENSION_SYM • SnaccDirectives LCASEFIRST_IDENT_SYM Type GETS_SYM LineNo Value END_SYM $end
  Reduce derivation
    $accept
    ↳ 0: ModuleDefinition                                                                                                                                                                                                                                                                                                                                         $end
         ↳ 3: ModuleIdentifier DEFINITIONS_SYM TagDefault $@1 ExtensionDefault GETS_SYM BEGIN_SYM OptionalSnaccNamespace ModuleBody                                                                                                                                                                                                                       END_SYM
                                                                                                                         ↳ 15: Exports Imports AssignmentList
                                                                                                                                               ↳ 37: AssignmentList                                                                                                             AssignmentOrError
                                                                                                                                                     ↳ 38: AssignmentOrError                                                                                                    ↳ 39: Assignment
                                                                                                                                                           ↳ 39: Assignment                                                                                                           ↳ 43: ValueAssignment
                                                                                                                                                                 ↳ 42: TypeAssignment                                                                                                       ↳ 234: identifier                  Type GETS_SYM LineNo Value
                                                                                                                                                                       ↳ 50: typereference GETS_SYM SnaccDirectives LineNo Type                                 SnaccDirectives                    ↳ 271: LCASEFIRST_IDENT_SYM
                                                                                                                                                                                                                           ↳ 54: DefinedMacroType
                                                                                                                                                                                                                                 ↳ 352: MtsasExtensionMacroType
                                                                                                                                                                                                                                        ↳ 456: EXTENSION_SYM •

shift/reduce conflict on token UCASEFIRST_IDENT_SYM:
  456 MtsasExtensionMacroType: EXTENSION_SYM •
  272 modulereference: • UCASEFIRST_IDENT_SYM
  First example: ModuleIdentifier DEFINITIONS_SYM TagDefault $@1 ExtensionDefault GETS_SYM BEGIN_SYM OptionalSnaccNamespace Exports Imports typereference GETS_SYM SnaccDirectives LineNo EXTENSION_SYM • UCASEFIRST_IDENT_SYM DOT_SYM LineNo typereference MtsasExtDefaultVal MtsasExtCritical SnaccDirectives AssignmentOrError END_SYM $end
  Shift derivation
    $accept
    ↳ 0: ModuleDefinition                                                                                                                                                                                                                                                                                                                                                                                               $end
         ↳ 3: ModuleIdentifier DEFINITIONS_SYM TagDefault $@1 ExtensionDefault GETS_SYM BEGIN_SYM OptionalSnaccNamespace ModuleBody                                                                                                                                                                                                                                                                             END_SYM
                                                                                                                         ↳ 15: Exports Imports AssignmentList
                                                                                                                                               ↳ 37: AssignmentList                                                                                                                                                                                                                           AssignmentOrError
                                                                                                                                                     ↳ 38: AssignmentOrError
                                                                                                                                                           ↳ 39: TypeAssignment
                                                                                                                                                                 ↳ 50: typereference GETS_SYM SnaccDirectives LineNo Type                                                                                                                                                     SnaccDirectives
                                                                                                                                                                                                                     ↳ 54: DefinedMacroType
                                                                                                                                                                                                                           ↳ 352: MtsasExtensionMacroType
                                                                                                                                                                                                                                  ↳ 455: EXTENSION_SYM NamedType                                                                          MtsasExtDefaultVal MtsasExtCritical
                                                                                                                                                                                                                                                       ↳ 82: Type
                                                                                                                                                                                                                                                             ↳ 56: DefinedType
                                                                                                                                                                                                                                                                   ↳ 52: ExternalTypeReference
                                                                                                                                                                                                                                                                         ↳ 51: modulereference               DOT_SYM LineNo typereference
                                                                                                                                                                                                                                                                               ↳ 272: • UCASEFIRST_IDENT_SYM
  Second example: ModuleIdentifier DEFINITIONS_SYM TagDefault $@1 ExtensionDefault GETS_SYM BEGIN_SYM OptionalSnaccNamespace Exports Imports typereference GETS_SYM SnaccDirectives LineNo EXTENSION_SYM • SnaccDirectives UCASEFIRST_IDENT_SYM GETS_SYM SnaccDirectives LineNo Type SnaccDirectives END_SYM $end
  Reduce derivation
    $accept
    ↳ 0: ModuleDefinition                                                                                                                                                                                                                                                                                                                                                                  $end
         ↳ 3: ModuleIdentifier DEFINITIONS_SYM TagDefault $@1 ExtensionDefault GETS_SYM BEGIN_SYM OptionalSnaccNamespace ModuleBody                                                                                                                                                                                                                                                END_SYM
                                                                                                                         ↳ 15: Exports Imports AssignmentList
                                                                                                                                               ↳ 37: AssignmentList                                                                                                             AssignmentOrError
                                                                                                                                                     ↳ 38: AssignmentOrError                                                                                                    ↳ 39: Assignment
                                                                                                                                                           ↳ 39: Assignment                                                                                                           ↳ 42: TypeAssignment
                                                                                                                                                                 ↳ 42: TypeAssignment                                                                                                       ↳ 50: typereference               GETS_SYM SnaccDirectives LineNo Type SnaccDirectives
                                                                                                                                                                       ↳ 50: typereference GETS_SYM SnaccDirectives LineNo Type                                 SnaccDirectives                   ↳ 273: UCASEFIRST_IDENT_SYM
                                                                                                                                                                                                                           ↳ 54: DefinedMacroType
                                                                                                                                                                                                                                 ↳ 352: MtsasExtensionMacroType

@apconole
Copy link
Member

This looks the same as issue #54 - I'll try to get some time to work on it this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants