Parser (myBNF)
PART I - Intro & TOC
| << Previous | Main | Next >> |
myBNF
An FSG (Finite-State Grammar) parse table generated by myBNF.
About
myBNF is a free LALR(1) parser written in pure VB. It handles Pascal / Prolog style BNF (Backus Normal Form) productions.
(note: parses are generated in REAL-TIME and MAY change during user input)
System Requirements
Download
If your system meets the requirements stated above, you may download myBNF here (with source).
(note: this program is provided AS IS without warranty of any kind.. etc etc)
Screenshots

The classic "Dangling-Else" problem solved using myBNF. Here, the shift-reduce conflict is handled by assuming a shift-first policy. The reduce-reduce conflict is dealt with by choosing at random (this is not the usual way of doing things and sometimes results in an incorrect parse, but unless there is sufficient look-ahead, a non-deterministic state-change is preferred for its speed advantage).

A math expression parse example. Compilers use this technology to sort out the correct order of operations observing simple rules of arithmetic. D-MEP does the same but much faster, using a different technique. myBNF makes up for this deficiency by supporting custom grammar definitions. That way, not only math can be parsed, but also any script for which a script can be written.

A natural language parsing example. English, like VB and C++ can also be parsed using traditional syntax analysis techniques. Although some may argue that Natural Languages aren't always context free and LALR(1) parsers may not handle them, a few clever work-arounds can potentially overcome this limitation.
Table of Contents
| << Previous | Main | Next >> |
Next: EOF (aka no more)