[erlang-patches] New yecc:file/2 option: parserpackage (R12B updates)

Alceste Scalas <>
Fri Feb 15 12:07:23 CET 2008

Il giorno gio, 14/02/2008 alle 17.19 +0100, Alceste Scalas ha scritto:
> Il giorno gio, 14/02/2008 alle 14.43 +0100, Alceste Scalas ha scritto:
> > This option allows to generate parsers within Erlang packages: for
> > example, given the file src/foo/bar/parser.yrl, a call like
> > 
> >         yecc:file(parser, [{parserpackage, 'foo.bar'}])
> > 
> > will generate parser.erl with module 'foo.bar.parser' (instead of
> > 'parser' alone).
> The following patch may help, too: it makes the generated parsers always
> use absolute module references, by adding a leading dot to some function
> calls (both in yecc.erl and yeccpre.hrl).

D'oh, the previous patches were only tested with OTP-R11B-5 and don't
apply cleanly on newer OTP releases.  I'm sorry!

Here's an updated patch, tested with OTP-R12B-1, that implements both
the new 'parserpackage' option and absolute module references in
generated parsers.


Alceste Scalas <>
CRS4 - http://www.crs4.it/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yecc-r12b-parserpackage.diff
Type: text/x-patch
Size: 7125 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20080215/09b04407/attachment.bin>

More information about the erlang-patches mailing list