From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.help Subject: Re: Parsing Date: Sun, 30 Nov 2014 21:04:35 +0100 Message-ID: <87wq6c8nfw.fsf@arcor.de> References: <873891xeg9.fsf@nothing.invalid> <878uiswx59.fsf@debian.uxu> <87sih0trni.fsf@nothing.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417377926 6920 80.91.229.3 (30 Nov 2014 20:05:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Nov 2014 20:05:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 30 21:05:19 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XvAkA-0007cv-KF for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Nov 2014 21:05:18 +0100 Original-Received: from localhost ([::1]:51628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvAk9-0008OW-UZ for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Nov 2014 15:05:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvAjp-0008M3-T3 for help-gnu-emacs@gnu.org; Sun, 30 Nov 2014 15:05:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvAji-0003Gb-Eh for help-gnu-emacs@gnu.org; Sun, 30 Nov 2014 15:04:57 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:34186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvAji-0003GV-8g for help-gnu-emacs@gnu.org; Sun, 30 Nov 2014 15:04:50 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XvAjh-0007Mr-95 for help-gnu-emacs@gnu.org; Sun, 30 Nov 2014 21:04:49 +0100 Original-Received: from ip4d154d80.dynamic.kabel-deutschland.de ([77.21.77.128]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Nov 2014 21:04:49 +0100 Original-Received: from deng by ip4d154d80.dynamic.kabel-deutschland.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Nov 2014 21:04:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip4d154d80.dynamic.kabel-deutschland.de User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.91 (gnu/linux) Cancel-Lock: sha1:bnEsmN2f7/TfwiPRbtxlmMBx/CU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101331 Archived-At: 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