[View] [Edit] [Attachments] [History] [Home] [Changes] [Search] [Help]
LanguageGame is a parser generator that has graphical user interface written in Squeak. Though parser generator is a professional tool that is used to develop a programming language. With LanguageGame, I hope that non-professional computer users,students or children will be able to learn the concept of "programming language" and to design their original language.
LanguageGame is based on SmaCC compiler compiler, thus a parser build on LanguageGame is able to use as SmaCC parser. LanguageGame's syntax is very simple and easy. SmaCC's syntax is little bit complex but more powerful. You are able to choose both style of syntax and to see graphical syntax tree whichever.
LanguageGame is easy to use. If you get the package, just do it "GGame open". LanguageGame main window is going to open. You look such a window with two pane. The top pane is a grammar pane and the bottom one is a test pane. At first, try a easy syntax "Hello world".
It's completely easy. It is acceped if you put "Hello world" to test pane, but fault with wrong sentence like "bye world". As you expected, a parser is accepted a sentence matched left-hand-side sentence basically.
Make your parser
You can make your own grammar. If you enter alt(cmd) + s key, the grammar is overwrited as current name ("Unnamed"). Selecting "save as .." in a context menu, a parser with new name is saved. A LanguageGame's parser is stored as a Smalltalk's class. If you make LanguageGame parser named "Hoge", the parser is become a Smalltalk's (SmaCC's) class as HogeParser and HogeScanner.
More complex syntax
As special token, you can use <word> and <number>, they are represented any word or number. Moreover you can use nested rule for making more complex syntax.