Related articles |
---|
Parser Generators for Multiple Protocols in an Embedded Device nou.dadoun@polycom.com (2002-04-23) |
Re: Parser Generators for Multiple Protocols in an Embedded Device dr_feriozi@prodigy.net (SLK Parsers) (2002-04-24) |
Re: Parser Generators for Multiple Protocols in an Embedded Device k.prasad@attbi.com (Kamal R. Prasad) (2002-04-29) |
Re: Parser Generators for Multiple Protocols in an Embedded Device haberg@matematik.su.se (2002-05-04) |
Re: Parser Generators for Multiple Protocols in an Embedded Device k.prasad@attbi.com (Kamal R. Prasad) (2002-05-04) |
From: | "SLK Parsers" <dr_feriozi@prodigy.net> |
Newsgroups: | comp.compilers,comp.lang.misc |
Date: | 24 Apr 2002 22:28:50 -0400 |
Organization: | Prodigy Internet http://www.prodigy.com |
References: | 02-04-133 |
Keywords: | parse |
Posted-Date: | 24 Apr 2002 22:28:50 EDT |
Nou Dadoun <nou.dadoun@polycom.com> wrote in message
> What I'm hoping might be possible is one that has a 'core' processing
> engine (which need only be loaded once) with a table or some other
> data structure that identifies the parsing rules for each individual
> protocol. (This likely imposes a reentrancy/thread-safeness
> requirement as well.)
This is nearly a description of top-down table-driven parsing. A very
small, simple driver is used to implement the parsing logic contained
in tables. The only difference is that the parse routine is so small
that there is really not much to be gained by having a single
'processing engine'. It could be done though, just pass the tables as
parameters to the parser.
An object-oriented implementation could also handle the single engine
idea. Just make the tables instance parameters of the class
constructor. Bit of a slant on the usual notion of objects, but it
should work. I will investigate adding this idea to SLK. Even without
this, SLK parsers are quite compact. The parsers will be better
suited for embedded applications after the current library dependency
is removed.
http://parsers.org/slk
[There are lots and lots of table driven parsers. Yacc is probably the
best known. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.