[MUD-Dev] Storing tokens with flex & bison

Ola Fosheim Grøstad <olag@ifi.uio.no> Ola Fosheim Grøstad <olag@ifi.uio.no>
Mon Jan 3 14:17:09 New Zealand Daylight Time 2000


J C Lawrence wrote:
> before I ran across PCCTS et al.  Recursive decent parsers are easy
> to do, easy to get reasonably right as long as your language is
> regular,

You don't need a stack to recognize a regular language, but a regular
language can't balance parentheses... You probably meant a context free
LL(1) grammar (=>you can decide what kind of language construct you are
dealing with by looking at the next symbol). The parser is easy to do
once you have got the grammar right. For the average mud designer it
would probably be more useful to draw syntax diagrams than writing a BNF
spec.

A recursive decent parser isn't bounded by the limitations of a context
free grammar of course.  You can easily determine whether a function has
been declared or not by a quick look-up. If you were to do that using a
formal grammar you would have to use a context sensitive one.

Ola.





_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list