james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Draeger <jdrae...@gmx.de>
Subject ANTLR
Date Fri, 08 Dec 2006 07:43:16 GMT
Hi all,

Okay, ANTLR has quite a steep learning curve. It took me some hours to
create the first useful code.
But then it's just great.

It does exactly what I want: Parse the request and create an object tree
representing it. 
It is possible to influence the structure of the tree and even the
classes of the tree nodes. 
One solution would be extending the ANTLR tree nodes (AST) and implement
an implementation independent, request representing interfaces.
AFAIK it is also possible to take full control of the tree generation.

Probably the best thing is that it is possible to manually transform the
RFC ABNF.
This could be done by achieving a nearly 1:1 relation between the
entities from the ABNF and ANTLR rules.
This allows a straight forward development and makes review for
correctness quite effective.

A positive side effect: Abstraction often costs some extra time lost in
the frameworks. In this case the generated code seems to be optimized
for speed.

Conclusion: IMO the best way to handle complex parsing. Maybe even for
simple parsing. :-)

Joachim



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message