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

Happy should error out on duplicate productions #158

Open
harpocrates opened this issue Nov 5, 2019 · 0 comments
Open

Happy should error out on duplicate productions #158

harpocrates opened this issue Nov 5, 2019 · 0 comments

Comments

@harpocrates
Copy link
Contributor

  1. Consider the following short grammar:

    foo :: { Int }
       : int             { $1 }
    
    foo :: { Int }
       : int             { $1 + 4 }
    

    Happy should not accept this - it should complain that I've defined foo twice. Right now, it just silently picks one of the two.

  2. Consider the following shorter grammar:

    foo :: { Int }
    foob
       : int             { $1 }
    

    Happy should not accept this - it should complain that the name foob does not match the expected name foo. Right now, it just uses foo and ignores foob completely.

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