in reply to Parsing BNF syntax diagrams..
Another example of a two-dimensional language is Befunge, a language whose sole purpose is to be hard to parse :-) You might try looking at Befunge parsers to get an idea of how to go about it.
I have not tried to understand your compiler, but if I was to go about this, I would split each diagram into a two-dimensional array of single characters. Then I would 'walk' the diagram, building up a topological graph. Finally, I would convert that graph/NFA into a grammar.
But the fastest method might just be to convert the diagrams manually yourself.
-Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parsing BNF syntax diagrams..
by dazzle (Sexton) on Aug 20, 2004 at 21:06 UTC | |
by BrowserUk (Patriarch) on Aug 20, 2004 at 22:32 UTC |