From: | Kenn Heinrich <kwheinri@bsr2.uwaterloo.ca> |
Newsgroups: | comp.compilers |
Date: | 13 Aug 2004 17:26:17 -0400 |
Organization: | University of Waterloo |
References: | 04-08-046 04-08-058 04-08-074 |
Keywords: | parse, theory |
Posted-Date: | 13 Aug 2004 17:26:17 EDT |
Larry Evans <cppljevans@cox-internet.com> writes:
> Is there something like an identity element for the alternative
> operator, |.
The alternative operator is just set union, where the sets are
languages. So the identity is the empty set, the language {}.
There is no string (including e) that matches {}.
> In addition, could this be what parsers are "in theory"
> using when the lexer's return # (as in yacc) to signal the end of input?
>
Dunno. I don't usually think of e or {} as entailing any sort of
action, but maybe you can :-)
Regards,
- Kenn
Return to the
comp.compilers page.
Search the
comp.compilers archives again.