Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrielle-pr committed Jul 10, 2019
1 parent 52001c5 commit 2f7cfe2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/source/godonnie/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ GoDonnie Interpreter
-------------

The GoDonnie.cpp is GoDonnie's main file.
1) It parses GoDonnie's command line arguments. Type GoDonnie --h
2) If GoDonnie is run in terminal mode, it gets the terminal's commands using readline library
3) If GoDonnie is run in batch mode, it reads the entire GoDonnie file
4) Despite the mode (terminal or batch) to call the parser with the command 'Compiler.parseGD'
1) It parses GoDonnie's command line arguments. Type GoDonnie --h
2) If GoDonnie is run in terminal mode, it gets the terminal's commands using readline library
3) If GoDonnie is run in batch mode, it reads the entire GoDonnie file
4) Despite the mode (terminal or batch) to call the parser with the command 'Compiler.parseGD'

The Compiler.cpp class implements the GoDonnie's programming language parser
1) The 'parseGD' method creates the lexer and parser tree for the incoming string in the GoDonnie programming language format
2) This file includes the files "GoDonnieLexer.h" "GoDonnieParser.h", which are automatically generated by Antlr, based on the file GoDonnie.g
3) If the parsing is successful, then it runs its commands with the method 'run'
4) The 'run' method executes each command in the parse tree. This method is a big switch used to select the current token to be executed.
5) For most of the GoDonnie's instruction call command in the Donnie attribute of the ExprTreeEvaluator class. This attribute implements the DonnieClient class, with all command GoDonnie can execute. DonnieClient does the interface between the parser and Player.
1) The 'parseGD' method creates the lexer and parser tree for the incoming string in the GoDonnie programming language format
2) This file includes the files "GoDonnieLexer.h" "GoDonnieParser.h", which are automatically generated by Antlr, based on the file GoDonnie.g
3) If the parsing is successful, then it runs its commands with the method 'run'
4) The 'run' method executes each command in the parse tree. This method is a big switch used to select the current token to be executed.
5) For most of the GoDonnie's instruction call command in the Donnie attribute of the ExprTreeEvaluator class. This attribute implements the DonnieClient class, with all command GoDonnie can execute. DonnieClient does the interface between the parser and Player.

The GoDonnie.g file implements the rules of the GoDonnie language
1) The initial part of this file, before the rule 'start_rule' is just a resource made to change the ANTLR default error message such that these messages are more user-friendly
2) After the rule 'start_rule', it is the language definition itself. All tokens and grammar are defined here.
1) The initial part of this file, before the rule 'start_rule' is just a resource made to change the ANTLR default error message such that these messages are more user-friendly
2) After the rule 'start_rule', it is the language definition itself. All tokens and grammar are defined here.

The DonnieClient.cpp file implements the interface with Player middleware. It's method implements all actions that Donnie can execute via Player.
The list of commands include:
1) moveForward, moveBackward, GetPos, Scan, GetRange, Speak, Color, Goto, among others
1) moveForward, moveBackward, GetPos, Scan, GetRange, Speak, Color, Goto, among others

The Exception, Historic, and DonnieMemory are auxiliary files with secondary functions

0 comments on commit 2f7cfe2

Please sign in to comment.