home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,046 of 2,753   
   Armel to All   
   Re: coupling LALR with a scanner?   
   07 Jul 11 10:28:46   
   
   From: armelasselin@hotmail.com   
      
   >[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]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca