| View previous topic :: View next topic |
| Author |
Message |
Nick Guest
|
Posted: Tue May 27, 2008 10:45 pm Post subject: Help on creating a run-time customizable Generic Parser |
|
|
Hi there,
I was wondering if any of you guys know a good tutorial/book/essay/
white paper on creating a generic protocol parser? What I am needing
is a generic protocol parser that can read in human editable
configuration files at run time and be able to configure itself to
read the specified protocol, and place it into a data structure
representing the packet and the data that it contains. It looks like
everything will need to be generic, almost nothing is going to be hard
coded into the parser. I can't really ask any specific questions right
now, for I do not really understand the concept entirely. But I do
need to be pointed in the right direction for learning more about how
to go about this.
Do any of you guys have suggestions?
thanks,
Nick |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
H. S. Lahman Guest
|
Posted: Wed May 28, 2008 7:36 pm Post subject: Re: Help on creating a run-time customizable Generic Parser |
|
|
Responding to Nick...
| Quote: |
I was wondering if any of you guys know a good tutorial/book/essay/
white paper on creating a generic protocol parser? What I am needing
is a generic protocol parser that can read in human editable
configuration files at run time and be able to configure itself to
read the specified protocol, and place it into a data structure
representing the packet and the data that it contains. It looks like
everything will need to be generic, almost nothing is going to be hard
coded into the parser. I can't really ask any specific questions right
now, for I do not really understand the concept entirely. But I do
need to be pointed in the right direction for learning more about how
to go about this.
|
I don't know of any dedicated to this offhand. However, if one were
building a generic parser for arbitrary text languages (a la Lex &
Yacc), one would start by abstracting the invariants of a standard meta
language like BNF. That would yield abstractions like SyntaxTable,
SyntaxRow, Production, Terminal, etc. Then one would identify the
parsing responsibilities of each and connect the dots in the design. I
don't know if a formal protocol meta language analogous to BNF exists.
If it does, then I would start there.
However, in practice protocols are so specialized that the lingua franca
may well be finite state machines. Basically protocols are about sending
messages when certain conditions prevail and defining constraints on the
sequencing of those messages. FSMs are ideally suited to that because
(A) they employ a quite general asynchronous communication model, (B)
conditions map directly to states, and (C) their transitions map
directly into the sequencing constraints of the protocol. Thus FSMs are
ubiquitous in R-T/E, especially telcomm development.
So if a standard meta language does not exist, I think you might well be
able to use the configuration data to create and initialize FSMs for any
particular protocol. All you would need to do is map the external
configuration data into particular senders/receivers, conditions,
transitions, and events. (Each sender or receiver would have its own
object FSM.)
--
There is nothing wrong with me that could
not be cured by a capful of Drano.
H. S. Lahman
hsl@pathfindermda.com
Pathfinder Solutions
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
"Model-Based Translation: The Next Step in Agile Development". Email
info@pathfindermda.com for your copy.
Pathfinder is hiring:
http://www.pathfindermda.com/about_us/careers_pos3.php.
(888)OOA-PATH |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|

103 Attacks blocked
Powered by phpBB © 2001, 2005 phpBB Group
|