Related articles |
---|
'^' and '$' in Regular expression march1896@gmail.com (Tangel) (2010-04-21) |
Re: '^' and '$' in Regular expression cfc@shell01.TheWorld.com (Chris F Clark) (2010-04-21) |
Re: '^' and '$' in Regular expression march1896@gmail.com (Tangel) (2010-04-21) |
Re: '^' and '$' in Regular expression mailings@jmksf.com (mailings@jmksf.com) (2010-04-22) |
Re: '^' and '$' in Regular expression armelasselin@hotmail.com (Armel) (2010-04-22) |
Re: '^' and '$' in Regular expression cfc@shell01.TheWorld.com (Chris F Clark) (2010-04-22) |
Re: '^' and '$' in Regular expression quinn_jackson2004@yahoo.ca (Quinn Tyler Jackson) (2010-04-22) |
Re: '^' and '$' in Regular expression cfc@shell01.TheWorld.com (Chris F Clark) (2010-04-22) |
From: | Quinn Tyler Jackson <quinn_jackson2004@yahoo.ca> |
Newsgroups: | comp.compilers |
Date: | Thu, 22 Apr 2010 09:12:42 -0700 |
Organization: | Compilers Central |
References: | 10-04-052 10-04-055 10-04-057 |
Keywords: | lex, DFA |
Posted-Date: | 22 Apr 2010 12:53:25 EDT |
On Wed, Apr 21, 2010 at 10:46 PM, Tangel <march1896@gmail.com> wrote:
> But when the regexp is /a*/, and the buffer is "aaaaa",
> after the pre-precessing, "\naaaaa\n" is not acceptable for /a*/.
The key here is that the state-machine must equate both \n and the
start state with a beginning-of-line state and \n and the final
no-more-input with the end-of-line state. In this way you no longer
need to pad the input with sentinels.
Cheers,
Quinn
Return to the
comp.compilers page.
Search the
comp.compilers archives again.