Idea of how to parse a non LL(k), LR(k) or LALR(k) grammar!

Rasmus Anthin <e8rasmus@etek.chalmers.se>
30 Jun 2000 00:51:40 -0400

          From comp.compilers

Related articles
Idea of how to parse a non LL(k), LR(k) or LALR(k) grammar! e8rasmus@etek.chalmers.se (Rasmus Anthin) (2000-06-30)
| List of all articles for this month |
From: Rasmus Anthin <e8rasmus@etek.chalmers.se>
Newsgroups: comp.compilers
Date: 30 Jun 2000 00:51:40 -0400
Organization: Chalmers University of Technology
Keywords: parse

I am not that familiar with LALR and LR so give me a buzz if I've got
something wrong.


I'm currently making an RDP for a difficult grammar of a language I
have designed. The grammar contains no keywords and because it is very
difficult to "look" behind a production (at least I think so) I got an
idea: What about if you could do a fake/dummy parsing and use a
variable to count the tokens "parsed". Then you can make tests of
token behind a production without parsing it. This method makes it
also possible to look behind multiple productions (I think). I have
thought of implementing this in my compiler. But since I'm soon
finished with my parser, I don't think I will need to use this
method. Does someone think this method sounds good, is there already
such a method, or will it not work at all?




Any suggestions?


\ B. Rasmus Anthin \ _ ______ |
    / e8rasmus@etek.chalmers.se / `/-==____/__|/__=-|


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.