Re: Flex/Bison/ANTLR question... alternative tools for translation?

rgaupsas <elikon@cox.net>
31 Mar 2005 23:29:09 -0500

          From comp.compilers

Related articles
Flex/Bison/ANTLR question... alternative tools for translation? elikon@cox.net (rgaupsas) (2005-03-15)
Re: Flex/Bison/ANTLR question... alternative tools for translation? lfinsto1@gwdg.de (Laurence Finston) (2005-03-18)
Re: Flex/Bison/ANTLR question... alternative tools for translation? Brian.Inglis@SystematicSW.ab.ca (Brian Inglis) (2005-03-20)
Re: Flex/Bison/ANTLR question... alternative tools for translation? sk@z.pl (Sebastian) (2005-03-20)
Re: Flex/Bison/ANTLR question... alternative tools for translation? elikon@cox.net (rgaupsas) (2005-03-24)
Re: Flex/Bison/ANTLR question... alternative tools for translation? Brian.Inglis@SystematicSW.ab.ca (2005-03-25)
Re: Flex/Bison/ANTLR question... alternative tools for translation? elikon@cox.net (rgaupsas) (2005-03-31)
Re: Flex/Bison/ANTLR question... alternative tools for translation? Brian.Inglis@SystematicSW.ab.ca (Brian Inglis) (2005-04-02)
| List of all articles for this month |
From: rgaupsas <elikon@cox.net>
Newsgroups: comp.compilers,comp.compilers.tools.pccts
Date: 31 Mar 2005 23:29:09 -0500
Organization: Cox Communications
References: 05-03-055 05-03-072 05-03-081 05-03-094
Keywords: parse, design
Posted-Date: 31 Mar 2005 23:29:09 EST

Brian.Inglis@SystematicSW.ab.ca wrote:
>>>>I'm working on a translator whereby the input grammar is poorly
>>>>defined; a lot is contextually dependent. ...
>
>
>>Sorry, my choice of the term COLOR was poor for this example. COLOR,
>>NAME, and PARAM can all be alpha-numeric combination. So a list of valid
>>terms is not applicable.
>
>
> We got the lexical content in your original post, and some syntax.
> What are the semantic differences between the three instances of COLOR
> in your example, and can you give us some real examples showing all
> the main instances, as if for test data?
>


If I understand your question... there are no semantic differences. The
following would all be valid:


za dog plane4 result=56.0
ztop all1 rick34 jane cat65abc car truck value=30e3
zhill car_34 table jet bug bear_45 num=34


The associated regular expression that would match COLOR NAME and PARAM is:
[a-z0-9]+[_a-z0-9]*



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.