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

Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
2 Apr 2005 19:32:21 -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: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Newsgroups: comp.compilers,comp.compilers.tools.pccts
Date: 2 Apr 2005 19:32:21 -0500
Organization: Systematic Software
References: 05-03-055 05-03-072 05-03-081 05-03-094 05-03-116
Keywords: parse
Posted-Date: 02 Apr 2005 19:32:21 EST

On 31 Mar 2005 23:29:09 -0500 in comp.compilers, rgaupsas
<elikon@cox.net> 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.


>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]*


Okay, all three non-terminal symbols match the same lexical pattern;
and PARAM is followed by = then a NUMBER; so how, and/or why, can you,
and/or do you, distinguish between COLOR and NAME i.e. how can you
tell looking at the test data?


--
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada


Brian.Inglis@CSi.com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
        fake address use address above to reply


Post a followup to this message

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