Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C# (http://www.programmingforums.org/forum16.html)
-   -   EBNF Grammar & LALR Parsers (http://www.programmingforums.org/showthread.php?t=3595)

Linguar Apr 27th, 2005 2:29 AM

EBNF Grammar & LALR Parsers
 
Oy...

I've never had such a headache after reading up on a theory. My project, Abstraction, needs a way to understand languages based upon an abstraction layer.

Now to expedite this process, I started researching E/BNF Or Extended (Or normal) Backus-Naur Form. It's a grammar that's commonly used in language theory to describe the basic structure of a language.

In this research I found that typical parsers for this use LL (Top down), LR (Bottom Up) or LALR

The one I'm going with, LALR is a look-ahead bottom-up parser, where instead of starting with the start entry and building off of that, you go backwards and find whatever's available and continually reduce into other rules until you get back to your root element, all the while building a derivation tree of the structure. They also work with a lot of various states and so forth that make my head hurt ^_^;

Does anyone here have any good resources on where to start with this kind of thing, and how much of what I have here is accurate?

I've written a parser before, but what I'm looking for now is something a bit more advanced.

Thanks in advance.

PS: The parts I'm interested in are figuring out how to create the states tables, or basically a better understanding of how everything fits together @_@;


All times are GMT -5. The time now is 5:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC