greg
e4a42e7691
Add back eval printing
2017-09-19 22:11:01 -07:00
greg
6e28ae68a0
Add options
2017-09-19 22:11:01 -07:00
greg
48b0b8d053
Add logic for picking language with command line flags
2017-09-19 22:11:01 -07:00
greg
e0c49abe56
Change show-llvm opt to -v
2017-09-19 22:11:01 -07:00
greg
65dc362a1d
Killed some warnings, cleaned up some code
2017-09-19 22:11:01 -07:00
greg
8ff1c632c2
Make REPL friendlier
2017-09-19 22:11:01 -07:00
greg
039022bfc5
Get rid of println
2017-09-19 22:11:01 -07:00
greg
387ec25cda
Fix bugs in interpreter argument parsing
2017-09-19 22:11:01 -07:00
greg
ecf60198fa
Can now switch between languages in the interpreter
2017-09-19 22:11:01 -07:00
greg
f83cece2b4
Import Maaru into main
2017-09-19 22:11:00 -07:00
greg
8fd5fb5a0b
Added language name functionality
2017-09-19 22:11:00 -07:00
greg
455fe2abe2
Get rid of stand alone evaluator
2017-09-19 22:11:00 -07:00
greg
902c85ccd7
Fully implemented state
...
If I make the LanguageInterface trait over a pair of language and
evaluator, then it works :)
2017-09-19 22:11:00 -07:00
greg
4ea600d55c
Abstracted most work into LanguageInterface trait
...
Still need to handle state
2017-09-19 22:11:00 -07:00
greg
6dec35d460
Think I've nearly gotten it traitified correctly...
2017-09-19 22:11:00 -07:00
greg
a303aa2a5b
Add first new language - Maaru
...
Maaru is intended to be a haskell-ish functional language.
Here's enough of a skeleton to print a thing
2017-09-19 22:11:00 -07:00
greg
421a9a7e9b
Abstract evaluation into EvaluationMachine trait
2017-09-19 22:11:00 -07:00
greg
178434171e
Cleaning up some types
2017-09-19 22:11:00 -07:00
greg
fd4610e175
Make newtype for LLVM code strings
2017-09-19 22:11:00 -07:00
greg
1a4bf24ab1
Move schala-specific stuff into its own module
2017-09-19 22:11:00 -07:00
greg
9d6bdf22da
More conversions to trait version
2017-09-19 22:11:00 -07:00
greg
8326a12c9c
(Largely) trait-ify Schala
...
The idea is to provide a trait `ProgrammingLanguage` that actually does
all the work, and then main.rs will just be the infra for storing its
own state
2017-09-19 22:11:00 -07:00
greg
1ac440c8df
Implement trait parse
2017-09-19 22:11:00 -07:00
greg
f5022a771c
Starting work to trait-ify language
2017-09-19 22:11:00 -07:00
greg
3e231b4715
Use native rust to write source file
2017-09-19 22:11:00 -07:00
greg
1702163478
Add flag for llvm
2017-09-19 22:11:00 -07:00
greg
bdd6f75cf6
Show/hide LLVM IR in REPL
2017-09-19 22:11:00 -07:00
greg
0ace370fc2
Tightened up REPL loop
2017-09-19 22:10:59 -07:00
greg
1f50fcc620
Improvments to interpreter directives parsing
2017-09-19 22:10:59 -07:00
greg
d7181afa91
Few more linefeed-related changes
2017-09-19 22:10:59 -07:00
greg
4eb7683f47
Move linefeed reader to struct
2017-09-19 22:10:59 -07:00
greg
b04a8f0092
Add back interpreter directives
2017-09-19 22:10:59 -07:00
greg
c50be58cd2
Moved from simplerepl to lineread crate
2017-09-19 22:10:59 -07:00
greg
7ddb421ced
Exit cleanly on opt parse fail
2017-09-19 22:10:59 -07:00
greg
9b74527618
Control printing eval steps with flags
2017-09-19 22:10:59 -07:00
greg
f158b6c712
Converted to multiple-evaluator logic
...
Now I have (basically) full single-step evaluation and it works fine
2017-09-19 22:10:58 -07:00
greg
9b62efc830
Fix conditional parsing
...
Needed to account for semicolons/newlines. Maybe need to generalize
delimiter-separated list of things
2017-09-19 22:10:58 -07:00
greg
e84550f3ec
Kill two compilation warnings
2017-09-19 22:10:57 -07:00
greg
3063de1242
Run rustfmt on the rest of them
2017-09-19 22:10:57 -07:00
greg
d4d61ce5ad
Use process::exit in main
2017-09-19 22:10:57 -07:00
greg
743311d18a
Convert Tokenize to Result
2017-09-19 22:10:57 -07:00
greg
fe8418edbe
Kill some extraneous spaces
2017-09-19 22:10:57 -07:00
greg
1d8102b9fa
Make compilation controllable
2017-09-19 22:10:57 -07:00
greg
aac3ca40fe
Add getopts
2017-09-19 22:10:57 -07:00
greg
3d406f1dd2
Move llmv wrapper into separate file
2017-09-19 22:10:57 -07:00
greg
95b773de7f
Compilation sequence
...
-move all steps of the llvm IR compilation process into the binary
2017-09-19 22:10:57 -07:00
greg
923566c4e9
Get rid of println's for token/ast debugging
...
Instead just explicitly stick them into the returned string.
This is necessary 'cause I'm gonna convert simplerepl to use ncurses
soon, so I can't have any side effects
2017-09-19 22:10:57 -07:00
greg
ee12e10ac6
Fix slice syntax
2017-09-19 22:10:56 -07:00
greg
6c44d295db
Framework for compilation
2017-09-19 22:10:56 -07:00
greg
cd69ebaa9d
Split main() into subfunctions
2017-09-19 22:10:56 -07:00