Recognizer for regular expressions

"Nirmal Prasad R." <nprasad@cyberrep.com>
31 Dec 2000 03:01:59 -0500

          From comp.compilers

Related articles
Recognizer for regular expressions nprasad@cyberrep.com (Nirmal Prasad R.) (2000-12-31)
| List of all articles for this month |
From: "Nirmal Prasad R." <nprasad@cyberrep.com>
Newsgroups: comp.compilers
Date: 31 Dec 2000 03:01:59 -0500
Organization: RoadRunner - Cox
Keywords: lex, question
Posted-Date: 31 Dec 2000 03:01:59 EST

Hi,


I am trying to write a recognizer for regular expressions which uses the
following algorithm instead of the normal NFA->DFA->Optimizer


a. Build working set for active expressions. (simply the first set at any
given point from current input location)
b. take 1 character from input, consult working set to reduce expressions
that don't match (input character not in first set). If no more rules exist
in the working set, return last longest matching token. If no rules ever
matched, we have an error.
c. advance by 1 character and re-generate first set.


The main purpose is to be able to build a lexical analyzer to which tokens
can be added in real-time without any code generation, compilation etc.


Are there any tools that allow one to do the above or similar?


Thanks in advance


Regards


Nirmal Prasad R.


Post a followup to this message

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