[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parsing
From: |
David Engster |
Subject: |
Re: Parsing |
Date: |
Sun, 30 Nov 2014 21:04:35 +0100 |
User-agent: |
Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.91 (gnu/linux) |
Bix writes:
> I like to convert a test file that pertain to some grammar into
> the relative AST, so I think that parsing as in CS compiler design is the
> closer description, but I may be wrong.
> Then I need some api to navigate the AST generated, or more simple do
> some walking on the AST generated.
The tool you're looking for is Semantic, not Senator. It contains a
simple LL parser called "Bovine" and a more advanced LALR parser which
is pretty much a port of Bison to Emacs Lisp, called "Wisent". If you
get the latest Emacs 24.4 you should find the documentation for them in
the accompanied info files (do 'C-h i'). If you want to get an
impression of the AST that is produced, load a simple C file, do 'M-x
semantic' and then 'M-x bovinate'. For further questions, the best place
to ask is the CEDET mailing list
http://sourceforge.net/p/cedet/mailman/
(also available on Gmane as gmane.emacs.cedet).
-David