Re: Question on extensibility of a gobo lexer/parser
Eric Bezault <ericb-D6Qt/9opevxWk0Htik3J/[email protected]> Tue, 17 Aug 2010 20:49:06 +0200
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Thomas thomas beale wrote: > Hi Eric, > we have various parsers in openEHR that follow the standard pattern published in your documentation, i.e. a .y & .l file generating the usual .e files. > > Now let's say Organisation A publishes a language and parser to go with it, such as the dadl syntax we use - some example files - http://www.openehr.org/svn/knowledge2/TRUNK/rm_schemas/ > > Let's say that Org B wants to use this syntax but extend it by adding some new patterns that can be recognised. > > How can Org B use Org A's published stuff to do this? Org B needs to add more patterns into the lexer definition, and more production rules into the parser definition. But there is no way to inherit a .y file into another .y file. Is there any kind of inclusion or other reuse mechanism available? > > To make the question more concrete, if it helps, imagine Org A's parser does not support date/time patterns between the <> delimiters, but Org B needs date/times. How could Org B add it (other than taking a copy of Org A's .l/.y files, which of course defeats any kind of maintenance)? I don't think that there is any reuse facility in .l and .y files. I'm afraid that the only solution is copy/paste. -- Eric Bezault mailto:ericb-D6Qt/9opevxWk0Htik3J/[email protected] http://www.gobosoft.com ------------------------------------ To Post a message, send it to: [email protected] To Unsubscribe, send a blank message to: [email protected]! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/gobo-eiffel/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/gobo-eiffel/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/