[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lojban-beginners] Re: RK-like diagramming: Anyone interested?



Jonathan Gibbons wrote:

Might try coming up with a graphical representation appealing to
myself. It seems to me that it might also be worthwhile to have a
similar map of the lojban grammar, as well. Would certainly solidify
my knowledge of the nitty-gritty of the language.

A map, that's an interesting way of putting it.

By any chance were you ever a Pascal programmer? To me, the
"railroad" notation was the simplest, clearest description
of language syntax I ever saw. Examples in the classic Wirth
books and so on.

Apparently there are some examples here:
http://www2.sis.pitt.edu/~sbrass/ds99_2/c2_2.ps
and some very garish ones here:
http://homepage.mac.com/lucaswagner/raskin/

When I wrote a simple compiler of my own, I didn't use yacc
or any such thing. I wrote a hand-written recursive descent
parser from scratch. And I found that syntax diagrams were
easy to write from: A loop was a literal cycle in the diagram,
and an alternative was an if or case type of construct. It
almost parsed itself.

Does anyone happen to know if the EBNF grammar at
http://www.lojban.org/publications/formal-grammars/bnf.300 is complete
in the sense that if you replaced all the words in a text with their
terminal symbols and used the information in the EBNF grammar, you
wouldn't fail on any important structures? (both because I want to
know if that'd be an appropriate source to work from in doing such a
graphical representation of the grammar, and beause I'd kinda like to
see a computer version using Bison's GLR feature, if that's possible,
to make a more readable computer form.)

The real status of that grammar is something interesting to me, but
I'm not a "real" grammar/parser guy.

Refer to Robin Powell's page:
http://www.digitalkingdom.org/~rlpowell/hobbies/lojban/grammar/

I don't know how up-to-date it is -- I assume this stuff doesn't
change as fast as we'd like.


Hal