Using transform modules

1 view
Skip to first unread message

Tony Arcieri

unread,
Oct 6, 2009, 12:35:35 AM10/6/09
to Neotoma
Hi, I'm a bit curious about how to structure my build scripts when
using a transform module.

My main concern is that neotoma wants transform modules to be named
the same as their corresponding .peg files with a .erl extension, but
this seems to be the same name that neotoma wants to output the
resulting .erl file as after the .peg file has been processed by
neotoma.

I was wondering how you would recommend my build system work when
using a transform module.

- Tony Arcieri

Sean Cribbs

unread,
Oct 6, 2009, 9:24:33 AM10/6/09
to neoto...@googlegroups.com
That's only the default. peg_gen:file/2 takes the {transform_module,
module_name} as an option.

The idea of having a separate module from the parser was to simplify
getting something working. I'd love your input on a simple, reliable
and clear syntax for putting code inline with the grammar, if you have
some. Then the transform module will be optional.

Sean

Tony Arcieri

unread,
Oct 9, 2009, 9:29:08 PM10/9/09
to Neotoma
On Mon, Oct 5, 2009 at 10:35 PM, Tony Arcieri <bas...@gmail.com> wrote:
My main concern is that neotoma wants transform modules to be named
the same as their corresponding .peg files with a .erl extension

Never mind, I read the source wrong... the behavior is actually opposite what I stated here.

Stupid =:= messing with my mind.

--
Tony Arcieri
Medioh/Nagravision

Tony Arcieri

unread,
Oct 9, 2009, 9:36:13 PM10/9/09
to Neotoma
On Fri, Oct 9, 2009 at 7:29 PM, Tony Arcieri <to...@medioh.com> wrote:
Never mind, I read the source wrong... the behavior is actually opposite what I stated here.

Stupid =:= messing with my mind.

All right, all appears to be good.  I'm wondering what this is about, though:

'src/compiler/reia_tree.erl' already exists, skipping generation.

--
Tony Arcieri
Medioh/Nagravision

Sean Cribbs

unread,
Oct 9, 2009, 10:04:02 PM10/9/09
to neoto...@googlegroups.com

>
> All right, all appears to be good. I'm wondering what this is about,
> though:
>
> 'src/compiler/reia_tree.erl' already exists, skipping generation.
>
This just means that it's not re-creating your transform module (i.e.
not obliterating your code).

Sean

Tony Arcieri

unread,
Oct 9, 2009, 10:06:21 PM10/9/09
to neoto...@googlegroups.com
On Fri, Oct 9, 2009 at 8:04 PM, Sean Cribbs <seanc...@gmail.com> wrote:
This just means that it's not re-creating your transform module (i.e. not obliterating your code).

I suppose the question is: why would it?  Is there some sort of transform module preprocessing you provide?

--
Tony Arcieri
Medioh/Nagravision

Sean Cribbs

unread,
Oct 9, 2009, 11:47:05 PM10/9/09
to neoto...@googlegroups.com
Well, because if the module doesn't exist, but you specified that it should use an external module for transformation, it will generate a stub for you.

Sean
Reply all
Reply to author
Forward
0 new messages