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

Fix shift/reduce conflict #1

Open
vyorkin opened this issue Aug 16, 2019 · 1 comment
Open

Fix shift/reduce conflict #1

vyorkin opened this issue Aug 16, 2019 · 1 comment
Assignees

Comments

@vyorkin
Copy link
Owner

vyorkin commented Aug 16, 2019


** 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 
@vyorkin
Copy link
Owner Author

vyorkin commented Aug 18, 2019

Affects #2

@vyorkin vyorkin self-assigned this Aug 18, 2019
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

1 participant