greg
6e188976f9
Quotes
2018-07-26 00:52:45 -07:00
greg
d235b47bc5
Change Symbol -> Word for token
2018-07-26 00:52:45 -07:00
greg
3fcb840ce5
Fix bug
2018-07-26 00:52:45 -07:00
greg
523bd179a4
Tighten code
2018-07-26 00:52:45 -07:00
greg
35e715dfd6
Intersperse
2018-07-26 00:52:45 -07:00
greg
6eb0fc8834
Parsing correctly yay
2018-07-26 00:52:45 -07:00
greg
c0a5418c27
Tokens
2018-07-26 00:52:45 -07:00
greg
42749c1ff6
Sexp parsing
2018-07-26 00:52:45 -07:00
greg
42b9507af0
Parses (
2018-07-26 00:52:45 -07:00
greg
38e85e2c78
Some halfwritten stuff
2018-07-26 00:52:45 -07:00
greg
7c5fef49f8
List datatype
2018-07-26 00:52:45 -07:00
greg
c1e214c701
Add a new language - Rukka
...
This is a (simple) lisp, partially for fun, partially for testing the
generic interfaces
2018-07-26 00:52:45 -07:00
greg
66e3de41dd
Make schala-lib::language private and reexport
2018-07-26 00:52:45 -07:00
greg
9545130fd3
Take TokenError type out of schala-lib
2018-07-26 00:52:45 -07:00
greg
ef7412dcd5
I don't need this syntax
2018-07-26 00:52:45 -07:00
greg
dee470cb8b
Kill some packages from schala bin
2018-07-26 00:52:45 -07:00
greg
c057f068ef
Get rid of unused imports
2018-07-26 00:52:45 -07:00
greg
c4dbdf1fe7
Refactor into libs part II
...
woo it compiles
2018-07-26 00:52:45 -07:00
greg
4c7174e4c4
Halfway done to library-ifying schala
2018-07-26 00:52:45 -07:00
greg
d0538faef3
PLIGenerators can be authoritative, not the instances themselves
2018-07-26 00:52:45 -07:00
greg
b97da01370
Some simplification
2018-07-26 00:52:45 -07:00
greg
b09efd3660
Passing things along as generators
2018-07-26 00:52:45 -07:00
greg
a42a58b155
Don't need mutex, kill it
2018-07-26 00:52:45 -07:00
greg
708c0ab103
Finally removed schala dependency
...
Now need to clena up everything
2018-07-26 00:52:45 -07:00
greg
1d9d0c4395
Okay this compiles
...
The secret (from #rust) appeared to be that Fn() needed to have + Send
explicitly annotated on it
2018-07-26 00:52:45 -07:00
greg
ffb87ebb82
Working on solution to Rocket state problem
2018-07-26 00:52:45 -07:00
greg
30c741f459
Some linker bullshit
...
I don't know why I needed to do this
2018-07-26 00:52:45 -07:00
greg
d19541b3e1
Splitting up some code
...
In preparation for splitting schala into crates
2018-07-26 00:52:45 -07:00
greg
3651461bbc
Some more structure in evaluator
2018-07-26 00:52:45 -07:00
greg
7730457878
Revert "Starting to split project into multiple crates"
...
This reverts commit e3b0f4a51e
.
Bah, this was a bad idea, wrong way to do it
2018-07-26 00:52:45 -07:00
greg
46dbac7f69
Starting to split project into multiple crates
2018-07-26 00:52:45 -07:00
greg
f68167f3a2
Halfway done with evaluating tuples
2018-07-26 00:52:45 -07:00
greg
c9625ffa77
Add module keyword
2018-07-26 00:52:45 -07:00
greg
9afbd2305f
Literal non-primitive values
2018-07-26 00:52:45 -07:00
greg
d7564f81c9
Starting work on literal non-primitve values
2018-07-26 00:52:45 -07:00
greg
2fbb8f2b2f
Can eval custom data constructors now
2018-07-26 00:52:45 -07:00
greg
1884eae191
Float literals, kill old code
2018-07-26 00:52:45 -07:00
greg
bb880d44fa
Some more primitive types + binop-checking
2018-07-26 00:52:45 -07:00
greg
22b4738726
Add required imports
2018-07-26 00:52:45 -07:00
greg
0202aab181
Some partial work on refactoring type infer fn
2018-07-26 00:52:45 -07:00
greg
f9c9ed6b29
Add colored output to non-interactive
2018-07-26 00:52:45 -07:00
greg
04cb1616f7
Convert webapp to using included files
2018-07-26 00:52:45 -07:00
greg
5f1c46cb87
Fix type check macro to add symbol table
2018-07-26 00:52:45 -07:00
greg
0ea9bd3d95
More work with unification
2018-07-26 00:52:45 -07:00
greg
0cf56eea4f
the evar table
...
TODO find a better way to represent this
2018-07-26 00:52:45 -07:00
greg
ab53c5394e
Unify work
2018-07-26 00:52:45 -07:00
greg
f6c85951fe
Move type-level func up
2018-07-26 00:52:45 -07:00
greg
c530715671
Okay I am figuring things out about hindley-milner again
2018-07-26 00:52:45 -07:00
greg
617a30b967
rename type_var to ty
2018-07-26 00:52:45 -07:00
greg
cd11d18385
String and () types
2018-07-26 00:52:45 -07:00
greg
f82c6199c0
Change around some stuff
2018-07-26 00:52:45 -07:00
greg
f75cd763f8
Change Variable to Value
2018-07-26 00:52:45 -07:00
greg
54c16f0190
Partial handling of user defined types
2018-07-26 00:52:45 -07:00
greg
8d8e3cd565
Starting to make unify actually work
2018-07-26 00:52:45 -07:00
greg
47975cf8f6
Convert unify to are types
...
b/c Type implements Clone
Maybe wanna kill this later for efficiency
2018-07-26 00:52:45 -07:00
greg
ddd861fbea
Have + do something different with strings
...
Needed to introduce polymorphism soon
2018-07-26 00:52:45 -07:00
greg
200d0f9867
Operator typing a little bit
2018-07-26 00:52:45 -07:00
greg
3e44bd3a18
Slight refactoring
2018-07-26 00:52:45 -07:00
greg
e2a94280c2
Renamed all the type-related types
2018-07-26 00:52:45 -07:00
greg
c5b3bafe43
Move some type checking code around
2018-07-26 00:52:45 -07:00
greg
b417451536
Basic typing test
2018-07-26 00:52:45 -07:00
greg
a0faed3603
String types
2018-07-26 00:52:45 -07:00
greg
83752a1c74
Some more type work
2017-10-10 01:04:19 -07:00
greg
66c7bbeb07
Floats, pathspec changes
2017-10-09 04:02:50 -07:00
greg
ed8359bcd7
Store constant state, func/binding as value
...
on symbol table, instead of key
2017-10-09 02:38:33 -07:00
greg
996f75e15c
A lot more type work
2017-10-09 02:26:59 -07:00
greg
30a54d997c
Simplify symbol table code
2017-10-09 00:59:52 -07:00
greg
4bcbf1854a
Use universal/existential type data structures
2017-10-09 00:36:54 -07:00
greg
f2c6556c2a
Use name TypeVariable
2017-10-09 00:22:42 -07:00
greg
9161e2751f
(Janky) type inference for explicitly-type-annotated values
2017-10-08 23:45:38 -07:00
greg
60fc9fd7e1
Super-basic type inference working
...
with a bunch of assumptions and hard-coded values
2017-10-08 23:33:53 -07:00
greg
3b249045aa
Call needs to accept a general argument
2017-10-08 23:02:03 -07:00
greg
ff0e14d9a9
Rename params -> args in Call Expr
2017-10-08 22:52:05 -07:00
greg
8fe535597e
Starting to actually do Hindley-Milner!!
2017-10-08 22:48:10 -07:00
greg
4bb8f82579
Make AST output red
2017-10-08 22:17:29 -07:00
greg
5cb8423ecc
Beginning for expressions
2017-10-08 22:07:18 -07:00
greg
4032707dc9
Kill some comments
2017-10-08 21:26:47 -07:00
greg
1a8423535a
Add test for function decl
2017-10-08 21:25:51 -07:00
greg
338981febe
Changed function signatures around slightly
2017-10-08 21:21:02 -07:00
greg
6dff8b029e
Function definitions expanded
2017-10-08 20:55:05 -07:00
greg
df877830d3
Fixed tests
2017-10-08 19:39:41 -07:00
greg
40696b3cbd
Rename TypeAnno to TypeName everywhere
2017-10-08 19:30:52 -07:00
greg
40a82d7e25
Tests for new type stuff
...
+ some renaming
2017-10-08 19:15:08 -07:00
greg
c605f76059
More type work II
2017-10-08 19:03:02 -07:00
greg
a6d71821b9
More type work I
2017-10-08 18:47:57 -07:00
greg
c4f0331d1a
Symbol table addition should be separate stage
2017-10-08 16:24:44 -07:00
greg
b4054d7581
Impl blocks
2017-10-08 14:24:02 -07:00
greg
74d3828c71
Symbol table debug needs to happen before type check
2017-10-08 13:59:55 -07:00
greg
bb57da564d
Infrastructure to debug symbol table
2017-10-08 13:57:43 -07:00
greg
3f9ae5fac3
Symbol table accepts variables
2017-10-08 13:51:56 -07:00
greg
62edc7c996
type checking / symbol table stuff
2017-10-08 12:22:04 -07:00
greg
e412fb9a89
Convert type-checking function type
2017-10-07 22:08:48 -07:00
greg
3a97401f61
Add symbol table insertion method skeleton
2017-10-07 21:57:51 -07:00
greg
87cfe854ac
Tuple literals
2017-10-06 20:28:07 -07:00
greg
184a2ae03a
Change syntax for type alias
2017-10-04 22:02:31 -07:00
greg
50ceb92d6b
Move type-checking into a module
2017-10-04 02:07:30 -07:00
greg
dd7736e32d
Add some resources
2017-10-03 21:28:17 -07:00
greg
3025af3ded
Starting on impls
2017-10-03 03:49:07 -07:00
greg
c83df6fd84
refactor main code
2017-10-02 23:33:07 -07:00
greg
65f64ebcc2
Add source file suffix to trait
2017-10-02 23:07:05 -07:00
greg
00ee802fbd
Clear up clutter in code from using std::process::
2017-10-02 23:00:11 -07:00
greg
c88d59401c
Making main.rs more concise
2017-10-02 22:58:03 -07:00
greg
1aa4e3b942
Get rid of virtual machine code
...
Gonna implement this differently
2017-10-02 20:34:51 -07:00
greg
abbbb34901
Some very basic evaluation stuff
2017-10-02 20:11:27 -07:00
greg
3ff4a34aeb
kill some non-used variable warnings
2017-10-02 01:52:46 -07:00
greg
7430aebe63
Webapp actually does something
2017-10-02 00:15:39 -07:00
greg
29d307ff53
Made web app a bit more useful
2017-10-01 23:25:36 -07:00
greg
89482e5b5a
Use a Result
2017-10-01 19:31:43 -07:00
greg
6435d5e958
Make eval output nicer
2017-10-01 19:29:05 -07:00
greg
f6536e7ebd
Evaluation stuff
2017-10-01 19:09:55 -07:00
greg
c5cb223168
Super-minimal type-checking with just ints
2017-10-01 17:50:26 -07:00
greg
d16a0c9380
Evaluation of literals
2017-10-01 12:55:28 -07:00
greg
daf9878020
Kill some unused code
2017-10-01 00:50:13 -07:00
greg
f825c87397
Type checking beginnings
2017-10-01 00:48:08 -07:00
greg
8d2a65b44e
Starting eval framework
2017-09-30 23:30:02 -07:00
greg
6b9fee1aed
Made handling parse errors nicer
2017-09-30 14:41:37 -07:00
greg
d05f173dd3
Using delmited! macro for more things
2017-09-30 14:11:38 -07:00
greg
e88a0f59b5
Made macro less complicatd
2017-09-30 13:46:50 -07:00
greg
90cf7db609
Use the delimiter macro in a few places
...
Made it capable of handling the strict <item> <delim> behavior necessary
for non-blocks, as well as teh loose behavior necessary for blocks,
added a test for a parse error.
2017-09-30 13:04:56 -07:00
greg
1ae9dbcba7
Tests for tuple type annotations
2017-09-30 01:14:49 -07:00
greg
9214f36c04
Tests for type annotations
2017-09-29 19:10:37 -07:00
greg
98169bd352
update test for new type anno format
2017-09-29 14:53:16 -07:00
greg
d60cf99ab5
Parsing sorta works
...
Need to handle double >> bug
2017-09-29 14:10:49 -07:00
greg
bb93d29beb
Some type anno parsing work
2017-09-28 23:55:10 -07:00
greg
c20f93e18c
A test for type annotation
2017-09-28 00:45:36 -07:00
greg
f48adbd9bf
Made the tests work again
2017-09-28 00:06:08 -07:00
greg
9ad506fc78
Handling type annotations in the AST
2017-09-27 22:27:50 -07:00
greg
4c81c36d67
Parse type annotations
...
Not using them yet
2017-09-26 22:10:13 -07:00
greg
230f2dd7ff
More match expr work
2017-09-21 16:00:14 -07:00
greg
4831a24853
yarn build script + rocket passthrough route
2017-09-20 23:21:45 -07:00
greg
8b83d982c0
More work on match expression
2017-09-20 21:05:08 -07:00
greg
6bff7aac0d
Match expressions
...
not done yet
2017-09-20 20:30:30 -07:00
greg
7ac5846282
A tiny bit more work on the webapp
2017-09-19 22:11:05 -07:00
greg
0f9d2d76c4
Serve an actual file
...
Convert this to stdweb soon?
2017-09-19 22:11:05 -07:00
greg
006fd7d411
Trying webapp
...
Note this doesn't work yet
2017-09-19 22:11:05 -07:00
greg
e3b236a15d
If expressions
2017-09-19 22:11:04 -07:00
greg
68bbd62ab6
Make token debug nicer
2017-09-19 22:11:04 -07:00
greg
e47a2c7241
Save REPL config to file
2017-09-19 22:11:04 -07:00
greg
a8b77848b4
kill old EBNF in comments
2017-09-19 22:11:04 -07:00
greg
839731f2d1
Make op! macro part of binexp!/prefexp! macros
...
For tests
2017-09-19 22:11:04 -07:00
greg
f51e1a3c47
make Operation a tuple-style struct
2017-09-19 22:11:04 -07:00
greg
fc350cd03e
Prefix operators
2017-09-19 22:11:04 -07:00
greg
8fe7c85b00
return keyword + idea for how to use it in for
2017-09-19 22:11:04 -07:00
greg
b920fae93b
variable bindings
2017-09-19 22:11:04 -07:00
greg
1981b74d89
Nicen up precedence-testing
2017-09-19 22:11:04 -07:00
greg
077ab8ddb8
Add trace to binexp parser
2017-09-19 22:11:04 -07:00
greg
9775bfc342
bool literals
2017-09-19 22:11:04 -07:00
greg
505d23a327
Parse . operator
2017-09-19 22:11:04 -07:00
greg
81c4566c2b
Improved operator parsing
2017-09-19 22:11:04 -07:00
greg
8be757beca
Some changes to EBNF grammar
2017-09-19 22:11:04 -07:00
greg
20c74953b5
Get rid of unimplemented! and panic!
2017-09-19 22:11:04 -07:00
greg
d5c3227966
Parse string literals
2017-09-19 22:11:04 -07:00
greg
fbeb101e7f
make parse trace have newlines
2017-09-19 22:11:04 -07:00
greg
18c761a5b5
Wrap all parse methods in record-printing macro
2017-09-19 22:11:04 -07:00
greg
89cf101362
Refactoring prace trace infra
2017-09-19 22:11:04 -07:00
greg
66d10604ba
make parse_method! macro more naturalistic
2017-09-19 22:11:04 -07:00
greg
565461e1db
Show more useful information in parse tracing
2017-09-19 22:11:04 -07:00
greg
5ecd28d057
Print parse record in REPL as TraceArtifact
2017-09-19 22:11:04 -07:00
greg
6c5dbac406
Starting to add logic to track recursive descent calls
2017-09-19 22:11:04 -07:00
greg
5dd1cd79ff
Parsing call expressions
2017-09-19 22:11:03 -07:00
greg
dfc89e5060
Index expressions
...
This only partially works
2017-09-19 22:11:03 -07:00
greg
5871bf68de
test for function parsing
2017-09-19 22:11:03 -07:00
greg
34b569eb5f
Starting to parse formal params
2017-09-19 22:11:03 -07:00
greg
5810fb7961
type alias test
2017-09-19 22:11:03 -07:00
greg
1a3076a949
Change syntax of rc macro
2017-09-19 22:11:03 -07:00
greg
1d9e5edfba
Rudimentary type stuff
2017-09-19 22:11:03 -07:00
greg
555d2a7ba5
Identifier tests
2017-09-19 22:11:03 -07:00
greg
291fb61c8d
Parse identifiers
...
Some more complicted types of expression
2017-09-19 22:11:03 -07:00
greg
685b579fdd
paren exprs
2017-09-19 22:11:03 -07:00
greg
f72e77cbb6
Remove printlns
2017-09-19 22:11:03 -07:00
greg
4b5afef17e
Added one more test
2017-09-19 22:11:03 -07:00
greg
5889998126
Precedence parsing
...
Using the Pratt parser algorithm (probably with some bugs as of yet).
Need to clean up the code some as well
2017-09-19 22:11:03 -07:00
greg
c19946bb6d
Additional test
2017-09-19 22:11:03 -07:00
greg
d1301b30e6
Added infra for operators
2017-09-19 22:11:03 -07:00
greg
f8287e42ce
Binary literal test case
2017-09-19 22:11:03 -07:00
greg
bd6bf2f4bb
Parse binary literal
2017-09-19 22:11:03 -07:00
greg
a6b336d84c
type anno EBNF
2017-09-19 22:11:03 -07:00
greg
deab74b992
Kill extraneous lines
2017-09-19 22:11:03 -07:00
greg
0755d42112
More parsing work
2017-09-19 22:11:03 -07:00
greg
117e0e38a8
Starting types
2017-09-19 22:11:03 -07:00
greg
3f1de5f60d
Kill unused struct
2017-09-19 22:11:03 -07:00
greg
c52fd4c73d
Parse test
2017-09-19 22:11:03 -07:00
greg
cac3ea86cf
Import TokenType and Kw everywhere
2017-09-19 22:11:03 -07:00
greg
92ece39d5e
Only IntLiteral
...
Signed/unsigned is via - operator
2017-09-19 22:11:03 -07:00
greg
14c09bb40c
Float literals too
2017-09-19 22:11:03 -07:00
greg
0dabbc700b
Concise-ify code
2017-09-19 22:11:03 -07:00
greg
741e5f7f9b
Parsing basic numbers!
2017-09-19 22:11:03 -07:00
greg
cfefceabf9
More infra
...
Don't want EOF after all
2017-09-19 22:11:02 -07:00
greg
ea08f8cab8
More parse infra
2017-09-19 22:11:02 -07:00
greg
7d1c07c481
Parsing infrastructure
2017-09-19 22:11:02 -07:00
greg
7831cb8d8a
Start parsing
2017-09-19 22:11:02 -07:00
greg
16d9e3eb60
Colored text for artifacts
2017-09-19 22:11:02 -07:00
greg
737dad6438
Added some tests
...
And commented out old tests for Maaru that don't compile
2017-09-19 22:11:02 -07:00
greg
74f8c16599
Fix bug with _
2017-09-19 22:11:02 -07:00
greg
a82f24a158
Kill import
2017-09-19 22:11:02 -07:00
greg
6459ad28e8
A few more keywords
2017-09-19 22:11:02 -07:00
greg
57d4222746
Operators, keywords largely working
2017-09-19 22:11:02 -07:00
greg
88d1896281
Identifiers and keywords
2017-09-19 22:11:02 -07:00
greg
7fe0a6589e
Unclosed string
2017-09-19 22:11:02 -07:00
greg
ac5bdd7bcb
Change some func signatures around tokenizing and errors
2017-09-19 22:11:02 -07:00