diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-25 12:10:14 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-25 12:10:14 -0300 |
| commit | 7bda9de511a5642efb297eae98c6ea7c42b27754 (patch) | |
| tree | dff1aa772b9ac088c5bd07b8d10d944cbff89f96 /base/lang-impl.md | |
| parent | f028ea6dc555fc5192a96b00b8e96e90dbf6de55 (diff) | |
Start switch to maven modules
Diffstat (limited to 'base/lang-impl.md')
| -rw-r--r-- | base/lang-impl.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/base/lang-impl.md b/base/lang-impl.md new file mode 100644 index 0000000..c6c2ce2 --- /dev/null +++ b/base/lang-impl.md @@ -0,0 +1,23 @@ +# Language implementation details +First, a command is read from the user, and +checked to see if it has any interpreter pragmas +in it. If so, the interpreter pragma is handled +and we move onto the next command. + +Next, the command is prepared for parsing. +This involves 4 steps +1. Convert the command into tokens +2. Split operators from tokens. This means + converting tokens like 2+2 into the three tokens + 2, + and 2 +3. Deaffix tokens. This means deattaching brackets + and parenthesis from their attached tokens. +4. Remove blank tokens + +Next, is parsing. This is just a modified version +of the shunting-yard algorithm, with the +main modification being it properly handles +multiple nesting levels of parenthesis + +Then, the AST is created from the parsed +string.
\ No newline at end of file |
