Hello Lisp gurus
I need to extract data which if formated in a given ABNF format (RFC
2234)
How can I create a parser base on the ABNF definition?
Is there an existing package our there which already doing that?
Thanks
Tzach
··············@gmail.com wrote:
> I need to extract data which if formated in a given ABNF format (RFC
> 2234)
> How can I create a parser base on the ABNF definition?
> Is there an existing package our there which already doing that?
A while ago, I toyed with writing an EBNF parser.
http://standards.iso.org/ittf/PubliclyAvailableStandards/s026153_ISO_IEC_14977_1996(E).zip
The goal was to make a lispy variant of http://spirit.sourceforge.net/
The results are available at
http://androdna.com/ebnf-parser.tar.bz2
and my git repository is mirrored at
http://git.androdna.com/lisp/ebnf-parser/
Later,
Daniel
··············@gmail.com writes:
> Hello Lisp gurus
> I need to extract data which if formated in a given ABNF format (RFC
> 2234)
> How can I create a parser base on the ABNF definition?
> Is there an existing package our there which already doing that?
There are several parser generators, see: http://www.cliki.net/parser
--
__Pascal Bourguignon__ http://www.informatimago.com/
NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.
··············@gmail.com wrote:
> Hello Lisp gurus
> I need to extract data which if formated in a given ABNF format (RFC
> 2234)
> How can I create a parser base on the ABNF definition?
> Is there an existing package our there which already doing that?
>
> Thanks
> Tzach
>
A few weeks ago I wrote a small parser generator for LL(1), that is for
a recursive descent parser.
It takes a formal specification of the grammar as a set of production
rules, augmented with actions, checks the possibility of parsing as
LL(1) grammar and constructs a parser. The lexer has to be submitted
externally, there is no LEX like language for constructing a lexer.
The program is at
http://www.aviduratas.de/lisp/lisp/micasm/micro-asm.lisp
(the filename micro-asm.lisp is of course misleading, it comes from the
larger project, this parser generator is a part of).
There is a sample grammar (for a kind of arithmetic expressions) given
in the file, it contains all constructs, that are possible for
specifying a grammar.
If someone wants to write comments on my programming style they are of
course welcome, as my lisp programming experience is not so extensive yet.
Greetings
J�rgen
--
J�rgen B�hm www.aviduratas.de
"At a time when so many scholars in the world are calculating, is it not
desirable that some, who can, dream ?" R. Thom