Skip to content

Fix shift/reduce conflict #1

Description

@vyorkin

** Conflict (shift/reduce) in state 143.
** Token involved: TYPE
** This state is reached from main after reading:

LET ty_dec 

** The derivations that appear below have the following common factor:
** (The question mark symbol (?) represents the spot where the derivations begin to differ.)

main 
expr EOF 
local 
LET decs IN expr_seq END 
    list(dec) 
    (?)

** In state 143, looking ahead at TYPE, reducing production
** nonempty_list(loc(ty_dec)) -> ty_dec 
** is permitted because of the following sub-derivation:

dec list(dec) // lookahead token appears because list(dec) can begin with TYPE
dec_ty_fun // lookahead token is inherited
nonempty_list(loc(ty_dec)) // lookahead token is inherited
ty_dec . 

** In state 143, looking ahead at TYPE, shifting is permitted
** because of the following sub-derivation:

dec list(dec) 
dec_ty_fun 
nonempty_list(loc(ty_dec)) 
ty_dec nonempty_list(loc(ty_dec)) 
       ty_dec 
       . TYPE symbol EQ ty 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions