Yecc bug
Bjorn Gustavsson
bjorn@REDACTED
Mon Jun 12 11:51:09 CEST 2006
Have you tried R11B?
In R11B, quoted_atom/1 looks like this:
quoted_atom(Atom) ->
io_lib:fwrite('~w', [Atom]).
/Bjorn
Robert Virding <robert.virding@REDACTED> writes:
> There is a bug in yecc when using terminals whose names have
> characters which need \ escaping, for example the atom '\\'. The
> terminal atoms are generated without the extra "\" characters. This
> means that the generated .erl file will not compile correctly and the
> only fix is to go in by hand and add the "\" character.
>
> The bug is in the function quoted_atom which used to generate the atom
> name string of terminals:
>
> quoted_atom(Atom) ->
> [$'|atom_to_list(Atom)++"'"].
>
> There are no problems using atoms like these in productions as the
> code for generating the productions use erl_pp:expr which does it
> right.
>
> Robert
>
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list