[erlang-questions] about syntax tools

Robert Virding robert.virding@REDACTED
Sat Aug 6 14:59:33 CEST 2011


There is another way if you want to be able to dynamically add new syntax easily, and that is to use LFE (Lisp Flavoured Erlang) which does have a proper lisp macro package which lets you do things like this. Of course you need to do a "slight" syntax change first. :-)

Robert

----- Original Message -----
> On 5 August 2011 14:30, Richard Carlsson <carlsson.richard@REDACTED>
> wrote:
> > On 08/05/2011 02:30 PM, Andrew Kondratovich wrote:
> >>
> >> I can set -compile(parse_transform, Module).
> >> But parse_transform allow to modify forms. Are there any way to
> >> modify
> >> tokens while compiling ?
> >
> > No.
> >
> 
> Shame, that would be kind of cool, but I suppose a bit unruly. You
> can
> replace the tokenize bit during compilation as seen in
> https://github.com/alavrik/erlson - it'll need custom build though.
> That project uses a rebar plugin to hook into pre_compile and replace
> the `erl_parse` module. Pretty simple actually, though obviously
> being
> non-standard it could serious mess with compilation of
> other/unintended code if you mess up what erl_parse is supposed to
> really do.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
> 



More information about the erlang-questions mailing list