Groups | Search | Server Info | Login | Register


Groups > comp.compilers > #191

Re: coupling LALR with a scanner?

From "Armel" <armelasselin@hotmail.com>
Newsgroups comp.compilers
Subject Re: coupling LALR with a scanner?
Date 2011-07-07 10:28 +0200
Organization les newsgroups par Orange
Message-ID <11-07-015@comp.compilers> (permalink)
References <11-07-013@comp.compilers>

Show all headers | View raw


>[The usual approach is to set flex start states in your yacc or bison
>parser. >-John]

the LALR generator is one of mine and the idea here would be to select
automatically the right lexer from the currently accepted tokens. I have the
feeling that it must be doable. The target is to be able to write grammars
with such dependencies naturally without any (user level) grammar actions
and very minimal lexer meta-information (such as which lexer produces which
tokens).

Armel
[I think you will find that users hate a compiler where in each state the
lexer only recognizes the tokens valid in that state, since the only error
message it could produce is "invalid token."  Also remember that the LA in
LALR stands for Look Ahead, and the lexer is often one token ahead of the
parser. -John]

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

coupling LALR with a scanner? "Armel" <armelasselin@hotmail.com> - 2011-07-05 01:02 +0200
  Re: coupling LALR with a scanner? "Armel" <armelasselin@hotmail.com> - 2011-07-07 10:28 +0200
    coupling LALR with a scanner? "Karsten Nyblad" <uu3kw29sb7@snkmail.com> - 2011-07-07 10:46 +0200
    Re: coupling LALR with a scanner? "Karsten Nyblad" <uu3kw29sb7@snkmail.com> - 2011-07-08 14:39 +0200
      Re: coupling LALR with a scanner? "Armel" <armelasselin@hotmail.com> - 2011-08-04 11:17 +0200
        Re: coupling LALR with a scanner? Paul B Mann <paul@paulbmann.com> - 2011-09-13 13:38 -0700
          Re: coupling LALR with a scanner? "Armel" <armelasselin@hotmail.com> - 2011-09-16 10:47 +0200
            Re: coupling LALR with a scanner? "Armel" <armelasselin@hotmail.com> - 2011-09-19 13:52 +0200
            Re: coupling LALR with a scanner? Paul B Mann <paul@paulbmann.com> - 2011-09-19 12:12 -0700
              Re: coupling LALR with a scanner? "Armel" <armelasselin@hotmail.com> - 2011-09-20 09:40 +0200
                Re: coupling LALR with a scanner? Chris Dodd <cdodd@acm.org> - 2011-09-23 23:59 +0100
                Re: coupling LALR with a scanner? Chris F Clark <cfc@shell01.TheWorld.com> - 2011-09-29 00:00 -0400
                Re: coupling LALR with a scanner? "Armel" <armelasselin@hotmail.com> - 2011-10-02 16:41 +0200
                Re: coupling LALR with a scanner? Chris F Clark <cfc@shell01.TheWorld.com> - 2011-10-03 11:59 -0400
                Re: coupling LALR with a scanner? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-10-03 21:08 +0000
          Re: coupling LALR with a scanner? Paul B Mann <paul@paulbmann.com> - 2011-09-17 10:38 -0700

csiph-web