This repository has been archived by the owner on Jul 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
GeneralGuy4872
committed
Sep 27, 2019
1 parent
1319def
commit 50f7fd6
Showing
9 changed files
with
164 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
The extension language runtime executor works in the following way: | ||
|
||
1. As code is collected, literal numbers with primative operators are optimized out bottom-up | ||
2. remaining collected code is used to build an execution tree, top-down | ||
3. ALL remaining code in a BEGIN-END block is passed to the runtime, where it is then: | ||
executed from start to finish | ||
freed bottom-up | ||
4. each BEGIN-END block is processed thus until <EOF> | ||
|
||
if code is to be transpiled instead of interpreted, | ||
C code could will be emitted at step 3 | ||
instead of executing the runtime. | ||
|
||
because of how the parser is constructed, it is extreamly bulky, | ||
and probably always will be, even if moved away from a lex/yacc toolchain. | ||
(so what's the point?) | ||
|
||
to reduce it's parser overhead, a program should be broken into as many | ||
BEGIN-END blocks as possible, as the allocated program is flushed and | ||
executed after END. | ||
|
||
The parser is designed to generate calls from syntactically valid code; | ||
this early version cares not if this code is programatically sane, however, | ||
leading to the probability that untested code will crash games which call | ||
it in varying and spectacular fashion. | ||
|
||
aside from silently dropping invalid tokens, this language has very little | ||
error checking, as a result of a copious use of void*. most garbage data | ||
would be passed streight through to the running game, where it might catch | ||
in the clockwork. especially bogus data might even cause the language's | ||
runtime to throw hard errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(because trees grow top-down, precedence is listed here from bottom up) | ||
|
||
← typecast | ||
→ postfix ++, -- | ||
→ boolean logic | ||
→ equality | ||
→ bitwise xor, eq | ||
→ bitwise nand, nor | ||
→ addition, subtraction, bitwise or | ||
→ division | ||
→ multiplication, bitwise and | ||
← modulo | ||
← tetriation, expotentiation | ||
← negative, not, bitwise not, prefix ++, -- | ||
X functions, parenthases | ||
|
||
(note: pointers and derefs are either a cast or part of the variable token itself) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
const char* GAMEDIR = "default/" | ||
#define GAMEDIR "default/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
#define STATIC_PATH "/usr/lib/games/iwannaflycurses/" | ||
#define LIB_PATH "/usr/local/lib/iwannaflycurses/" | ||
#define SHARE_LIB_PATH "/usr/local/share/lib/iwannaflycurses" | ||
//the engine's private resources | ||
#define VAR_PATH "/var/games/iwannaflycurses/" | ||
#define GLOBAL_PATH "/etc/iwannaflycurses.d/" | ||
#define SHARE_PATH "/usr/share/games/iwannaflycurses/" | ||
#define DOC_PATH "/usr/share/doc/iwannaflycurses/" | ||
#define GAMES_PATH "/usr/games/iwannaflycurses/" | ||
//saved games and high scores | ||
#define GLOBAL_PATH "/usr/local/share/etc/iwannaflycurses.d/" | ||
//default config files | ||
#define LIB_GAMES_PATH "/usr/local/lib/games/iwannaflycurses/" | ||
#define SHARE_LIB_GAMES_PATH "/usr/local/share/lib/games/iwannaflycurses/" | ||
//each game's private resources | ||
#define INSTALL_MAN 1 | ||
#define MAN_PATH "/usr/local/share/man/" | ||
//manpages | ||
#define INSTALL_INFO 1 | ||
//install info pages | ||
#define INSTALL_DOC 1 | ||
#define DOC_PATH "/usr/local/share/doc/iwannaflycurses/" | ||
//documentation that is niether texinfo nor manpages | ||
#define INSTALL_HTML 1 | ||
#define HTML_PATH "/usr/local/share/doc/iwannaflycurses/" | ||
//HTML-optimized versions of the info pages | ||
#define INSTALL_SRC 1 | ||
#define SRC_PATH "/usr/local/share/src/iwannaflycurses/" | ||
//where to put the source, should you choose to install it | ||
#define GAMES_PATH "/usr/local/games/" | ||
//where games are installed | ||
#define BIN_PATH "/usr/local/bin/" | ||
//where non-game executables are installed | ||
#define DOT_PATH "~/.iwannaflycurses/" | ||
//where the config files are found |