# modification of parser.y

H. Peter Anvin (hpa@trantor.zytor.com)
Sat, 22 Jun 1996 21:46:41 PDT

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    Followup to:  <4qigbi$vsv@terminus.zytor.com>
    By author:    hpa@trantor.zytor.com (H. Peter Anvin)
    In newsgroup: local.moo
    > > =20
    > > I would be equally grateful to anyone who could point me to a man pag=
    e
    > > for LALR.  It seems to be conveniently missing on my system, as well =
    as
    > > every man pages server I've found on the web.  (ARGH!)
    > > =20

    Oh, by the way... LALR(1) is not a man page... the subset of all
    context-free grammars that yacc can generate a parser for is called
    LALR(1).  The parsing technique used is called "lookahead LR" (LALR --
    LR stands for left shift, right reduction) and yacc supports one (1)
    token worth of lookahead.  The one-token lookahead limit is, by the
    way, the reason why you wouldn't want to implement a chevron (<<)
    operator by entering '<' '<' directly into the parser.

    I have occationally seen LALR(2) parser generators, but they tend be
    very memory-hungry.  Similarly, an LALR(0) parser is very
    memory-efficient; unfortunately too many useful languages aren't in
    the LALR(0) set.

    For information on how to use yacc I recommend "Lex and Yacc" by
    Levine, Mason & Brown, published by O'Reilly and Associates.  The
    venerable "dragon book" has a more in-depth discussion of the LALR
    parsing techique.

    	-hpa

    --=20
    PGP public key available - finger hpa@zytor.com
    "The earth is but one country, and mankind its citizens."  --  Bah=E1'u'l=
    l=E1h
    Just Say No to Morden * The Shadows were defeated -- Babylon 5 is renewed=
    !!