From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,3ce0021c66d294ab,start X-Google-Attributes: gid10d4db,public From: jeffrey@best.com (Jeffrey Kegler) Subject: Marpa 2.8 -- Earley's Parser as a TCL Extension Date: 1995/04/22 Message-ID: <3nb2kk$s7f@myntti.helsinki.fi>#1/1 X-Deja-AN: 101882302 sender: wirzeniu@cc.helsinki.fi followup-to: comp.os.linux.development.apps content-type: text/plain; charset=ISO-8859-1 organization: Best Internet Communications, Inc. (info@best.com) keywords: Tcl, parsing, Earley mime-version: 1.0 newsgroups: comp.os.linux.announce A new release, 2.8, of Marpa is available via ftp at best.com:/pub/jeffrey/marpa/v2.8/marpa.2.8.tar.gz. Marpa is TCL extended with an enhanced version of Earley's algorithm for general parsing. The changes for 2.8 include greatly simplified programming of parse actions. The README follows: language: Marpa package: Marpa is TCL 7.3 extended with an enhanced Earley's Algorithm version: Alpha 2.8 parts: parser-generator, examples, document author: Jeffrey Kegler location: via anonymous ftp at either best.com:/pub/jeffrey/marpa/v2.8/marpa.2.8.tar.gz or at alexia.lis.uiuc.edu in the directory /pub/marpa/ legalities: freely redistributable without warranty under GNU Public License Version 2 Description: Marpa is a TCL 7.3 extended with an ambiguous context-free parser which uses Earley's algorithm. It is hacker friendly, with a variety of handy features. It is intended for use in implementing parsers that use the same crude but effective approaches to parsing that humans use, whether these humans be reading natural language or computer code. TCL code is attached to every production, explicitly or by default, and this is used to evaluate the result of the parse. The grammar is specified directly in BNF, extended with Kleene star sequences. The parse logic follows directly from the BNF. It handles ambiguous grammars, ambiguous tokens (tokens which were not positively identified by the lexer) and allows the programmer to change the start symbol. The input must be divided into "chunks" of tokens for best results. There is no limit enforced on chunks, but once they get larger than 500 tokens things slow down. There is no fixed distinction between terminals and non-terminals, that is, a symbol can both match the input AND be on the left hand side of a production. Multiple Marpa grammars are allowed in a single TCL interpreter, and multiple Marpa-extended TCL interpreters can run in a single program. Speed is reasonable if not blinding, and Marpa is in use in some applications. Marpa is the outcome of the Milarepa prototype which implemented a different general parsing algorithm in Perl. requires: TCL 7.3, GNU C compiler, GNU Make updated: 1995/04/19 -- Jeffrey Kegler, Algorists, Inc. 743 East El Camino Real, #338, Sunnyvale CA 94087, jeffrey@best.com -- Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov PLEASE remember Keywords: and a short description of the software.