Re: First/Follow sets in Recursive Descent Parsers

ralph@inputplus.demon.co.uk (Ralph Corderoy)
8 Aug 2001 01:07:55 -0400

          From comp.compilers

Related articles
First/Follow sets in Recursive Descent Parsers Dan.Haxell@btinternet.com (Dan Haxell) (2001-08-06)
Re: First/Follow sets in Recursive Descent Parsers ralph@inputplus.demon.co.uk (2001-08-08)
Re: First/Follow sets in Recursive Descent Parsers mike@dimmick.demon.co.uk (Mike Dimmick) (2001-08-08)
Re: First/Follow sets in Recursive Descent Parsers tmoog@polhode.com (Tom Moog) (2001-08-08)
Re: First/Follow sets in Recursive Descent Parsers therabbit@hole.com (2001-08-08)
| List of all articles for this month |
From: ralph@inputplus.demon.co.uk (Ralph Corderoy)
Newsgroups: comp.compilers
Date: 8 Aug 2001 01:07:55 -0400
Organization: InputPlus Ltd.
References: 01-08-029
Keywords: parse
Posted-Date: 08 Aug 2001 01:07:54 EDT

Hi,


> integral = '\int' [subscript superscript] '{' expression 'd' VARIABLE '}'.
>
> The problem I have is when parsing an integral: during the parse, I
> want the letter 'd' to have a new meaning, namely to designate the
> end of the expression and indicate the variable to integrate. This
> should only be the case when parsing an integral and normally it
> should be treated as a simple variable.


In your recursive descent parse set/clear a flag that indicates the {}
part of an integral is being parsed and have the flex lexer use this
when scanning a-z to determine if d is a variable or an integral
delimeter.




Ralph.


Post a followup to this message

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