Skip to content

Pretty-printer chokes on category named I #134

Closed

Description

@danr

With this grammar:

Foo. S ::= I ;
Bar. I ::= "i" ;

this error is obtained:

$ bnfc I.cf -m && make 
...
happy -gca ParI.y
alex -g LexI.x
ghc --make TestI.hs -o TestI
[3 of 7] Compiling PrintI           ( PrintI.hs, PrintI.o )

PrintI.hs:85:20:
    Couldn't match expected type ‘Int’ with actual type ‘I’
    In the first argument of ‘prPrec’, namely ‘i’
    In the expression: prPrec i 0 (concatD [prt 0 i])
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1

Activity

  1. added a commit that references this issue on Apr 13, 2015
  2. added a commit that references this issue on Apr 13, 2015
    8906815
  3. andreasabel commented on Jan 3, 2020

    @andreasabel
    Member

    Now tested along with #278.

  4. added a commit that references this issue on Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions