Related articles |
---|
followpos for '?' and '+' operators meeta.gupta@yahoo.com (Meeta Gupta) (2006-01-31) |
Re: followpos for '?' and '+' operators clint@0lsen.net (Clint Olsen) (2006-01-31) |
Re: followpos for '?' and '+' operators jburgy@gmail.com (jburgy) (2006-01-31) |
Re: followpos for '?' and '+' operators rpboland@gmail.com (Ralph Boland) (2006-02-02) |
From: | Clint Olsen <clint@0lsen.net> |
Newsgroups: | comp.compilers |
Date: | 31 Jan 2006 12:48:03 -0500 |
Organization: | Compilers Central |
References: | 06-01-130 |
Keywords: | lex, DFA |
Posted-Date: | 31 Jan 2006 12:48:03 EST |
On 2006-01-31, Meeta Gupta <meeta.gupta@yahoo.com> wrote:
> But How Can I Calculate The Followpos For '?' And '+' Operators? How
> Should I Handle These Operators When I Build The Syntax Tree For A
> Regular Expression.
Since you already know the rules for the '*', '.' and '|' operators, you
can intuitively figure out how to do it for '+' and '?'. Hint: You can
rewrite the syntax tree for '?' and '+' using the operators you already
know. So, '+' is the same as '{re}*' and so on...
-Clint
Return to the
comp.compilers page.
Search the
comp.compilers archives again.