[View] [Edit] [Attachments] [History] [Home] [Changes] [Search] [Help]
LanguageGame was now developed simple prototype. Now, I can describe some aspect bellow.
The omission of a function
The goal of this project is that I develop a parser generator with GUI and application used the parser. Because espacialy importance is user interface, I cut off some function of parser generator engine. I will give an outline of that abbreviation and feature.
The omission of scanner
Generally, parser generater is combined with scanner and parser. In this project, I determined scanner is omitted. Now I use the scanner of Sueak itself as scanner of LanguageGame. Therefore, tokens which is recognized LanguageGame are same tokens of Squeak.
In this system, BNF notation is used but you can't use parallel expression with '|', and it doesn't recognize difference between symbol with word, then grammar
pair : animal animal
animal : Tom
animal : Jerry
matches not only 'Tom Jerry' but also 'Tom animal'
LanguageGame supports the generation of buttom-up parser. But not using LR-table, it uses a poor rule that matches first pattern of right side simbols of stack. This strategy is not good for performance and strict, but enough as my first simple step.
Action with expressin of Smalltalk
Parsed object is evaluted with 'action'. This action is written in the expression of block context of Smalltalk. Each node have semantic value which is maked by evaluted the acton. Additionaly, action can deal with external object like Morph as global variable using bindingOf mechanism.
After parse, a parse tree is shown to screen by subclass of GTile. You can show the tree different ways to implement subclass of GTile.