Multiple inclusions cause multiple definitions => compile error

mitchell mforal.n... at gmail.com
Sat May 24 22:43:59 UTC 2008


Adrian,

> Do all of the files have write statements? Somehow multiple write
> commands for the html machine have been issued.

Yes, all have write statements because all are intended to be used
individually. That was the issue.

I guess now the question is, can I somehow specify a conditional so I
not do any writing for parsers that are being 'include'd? In this case
I normally want javascript.rl and css.rl to write data when they are
used individually, but I don't want them to write anything when being
'include'd by html.rl.

I'm not sure how familiar you are with Lua, but I used to write parser
modules in it. Each parser module had a name in a global namespace so
I could just do a:
  if [parser] then
    ... -- this parser is being included by [parser]
  end

Thanks,



More information about the ragel-users mailing list