Yecc bug

Robert Virding <>
Sun Jun 11 01:48:31 CEST 2006


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




More information about the erlang-questions mailing list