[ragel-users] Re: Bypass "previously defined" errors?

Adrian Thurston thurs... at cs.queensu.ca
Fri May 23 17:57:45 UTC 2008


What if we blocked files from being included more than once? In the
meantime can you lift the common include into the top-level ragel file?

-Adrian

mitchell wrote:
> Adrian,
> 
>> Could you give a bit more information about the use case? I haven't
>> heard of anyone needing to do this before. Is it because you've got some
>> stock ragel parser and you want to specialize it to some task by
>> redefining things?
> 
> I am writing programming language parsers. Some languages have other
> languages embedded in them. I want to "include" an embedded (child)
> language into a parent one. However, since either language parser can
> be used separately on its own, both "include" a common.rl file that
> contains common definitions and actions used by most parsers. Thus
> there is a double inclusion of common.rl and the error message for a
> parent-child language parser.
> 
> Thanks for your time,
> -Mitchell;
> > 
> 



More information about the ragel-users mailing list