Re: Building a scanner(or pattern matcher) from a CFG grammar?

"christopher diggins" <cdiggins@videotron.ca>
19 Dec 2004 23:54:01 -0500

          From comp.compilers

Related articles
Building a scanner(or pattern matcher) from a CFG grammar? petasis@iit.demokritos.gr (Georgios Petasis) (2004-12-16)
Re: Building a scanner(or pattern matcher) from a CFG grammar? idbaxter@semdesigns.com (Ira Baxter) (2004-12-17)
Re: Building a scanner(or pattern matcher) from a CFG grammar? petasis@iit.demokritos.gr (Georgios Petasis) (2004-12-19)
Re: Building a scanner(or pattern matcher) from a CFG grammar? cdiggins@videotron.ca (christopher diggins) (2004-12-19)
Re: Building a scanner(or pattern matcher) from a CFG grammar? cdiggins@videotron.ca (christopher diggins) (2004-12-22)
| List of all articles for this month |

From: "christopher diggins" <cdiggins@videotron.ca>
Newsgroups: comp.compilers
Date: 19 Dec 2004 23:54:01 -0500
Organization: Compilers Central
References: 04-12-064
Keywords: parse
Posted-Date: 19 Dec 2004 23:54:01 EST

"Georgios Petasis" <petasis@iit.demokritos.gr> wrote
> I am trying to find software that can convert a CFG grammar into a
> scanner, for locating patterns in text. I don't want a full parse, but
> find patterns in free text (like for example lex-based scanner do),
> but with the pattern language being CFG instead of regular. Any ideas?


You might want to check out the C++ YARD (yet another recursive descent)
parser, it comes with a tokenizer CFG grammars at:
http://www.codeproject.com/cpp/yard-tokenizer.asp


If you don't want to register to get the source, you can get the source code
at http://www.cdiggins.com/yard.zip


There is a new version under develpment which makes it easy to add semantic
actions to your code.


I hope this helps.


Christopher Diggins
http://www.cdiggins.com
http://www.heron-language.com


Post a followup to this message

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