|
e1f2c6b88b
|
Basic parsing infrastructure .. doesn't actually do anything
|
2016-12-29 16:58:02 -05:00 |
|
|
1d19a3f722
|
Fix up lexer tests after movement of stuff
|
2016-12-29 16:56:47 -05:00 |
|
|
a7c6caec95
|
Attempt to write tree printing for the parse tree
I have _no_ idea if this will work or not.
|
2016-12-29 15:14:56 -05:00 |
|
|
7f6ef1ac1e
|
Nodes for Program and Constant
|
2016-12-29 14:25:43 -05:00 |
|
|
1527d10a80
|
Shuffle around Constant node stuff
|
2016-12-29 12:36:22 -05:00 |
|
|
977e6332a7
|
Move nodes.rs to nodes/mod.rs
|
2016-12-29 12:34:05 -05:00 |
|
|
4cfd0510e6
|
Define a Constant node for constants
|
2016-12-29 12:33:20 -05:00 |
|
|
8f2a93f813
|
pub use Boolen and Number for types module
|
2016-12-29 12:33:11 -05:00 |
|
|
8d38ac4441
|
Add nodes module to parser
|
2016-12-29 12:22:43 -05:00 |
|
|
1728ea2868
|
Add boolean module to types
|
2016-12-29 12:22:29 -05:00 |
|
|
f799d7642d
|
Create types module with a module for numbers; move Number there
|
2016-12-29 10:10:40 -05:00 |
|
|
93bdc998bd
|
Create emtpy mod.rs for the parser module
|
2016-12-29 09:44:49 -05:00 |
|
|
c881ee874a
|
Use a string to build up the value of String tokens, so we can properly handle escape characters and such
|
2016-12-28 18:01:36 -05:00 |
|
|
872d07e6b7
|
Write a check_tokens() test helper that checks an input string against a list of tokens
|
2016-12-28 17:41:35 -05:00 |
|
|
c061d9732c
|
Lex characters, including #\newline and #\space
This implementation is pretty dumb I think... >_<
At least, it was annoying as hell to write.
|
2016-12-28 12:16:28 -07:00 |
|
|
94579233bf
|
Test lexing quotes
|
2016-12-28 10:57:16 -07:00 |
|
|
b1ef5fdf3e
|
Lex quotes -- need to write a test for this but captain says its time to put devices away...
|
2016-12-28 08:40:31 -07:00 |
|
|
89e639fbac
|
Remove TODO. I _did_ this. :)
|
2016-12-28 08:37:55 -07:00 |
|
|
c4048e2c01
|
Because Emily sooo immature 🙄
|
2016-12-28 08:37:04 -07:00 |
|
|
5d5ddf30d0
|
Find escaped characters in strings
|
2016-12-28 08:35:02 -07:00 |
|
|
575ebceb7c
|
Assert on errors
|
2016-12-27 12:13:21 -07:00 |
|
|
606f2853a9
|
Convert all the things
|
2016-12-27 12:10:15 -07:00 |
|
|
c3113742a3
|
Convert state_hash()
|
2016-12-27 11:52:25 -07:00 |
|
|
59a8804fd8
|
Convert state_dot()
|
2016-12-27 11:36:43 -07:00 |
|
|
64435689fc
|
Remove semicolon; add &self to generic_error()
|
2016-12-27 11:30:08 -07:00 |
|
|
0870727241
|
Convert state_identifier
|
2016-12-27 11:23:56 -07:00 |
|
|
245e6e711f
|
Convert state_initial to return a StateResult
|
2016-12-27 11:18:30 -07:00 |
|
|
71fb678c50
|
Add token_result() helper
|
2016-12-27 11:18:15 -07:00 |
|
|
8d00e3afcf
|
Take a String by move into error_string()
|
2016-12-27 11:18:06 -07:00 |
|
|
7d42ad280f
|
error_string method
|
2016-12-27 10:57:16 -07:00 |
|
|
f2ff1acdd1
|
Emit line and offset information with tokens in Lex objects
|
2016-12-27 10:53:38 -07:00 |
|
|
5b88ec73ec
|
Track character offset relative to line
|
2016-12-27 10:50:43 -07:00 |
|
|
f7e990925c
|
Add StateResult type
|
2016-12-27 10:47:18 -07:00 |
|
|
77c3df99c0
|
New simple expression test
|
2016-12-27 10:39:07 -07:00 |
|
|
b731b0323a
|
Update test names: finds for single tokens, lexes for expressions
|
2016-12-27 10:38:57 -07:00 |
|
|
b00615a7b6
|
Some tests for exact numbers; adding sign after exact specifier
|
2016-12-27 10:14:03 -07:00 |
|
|
00d8380eac
|
Add exactness indicator
|
2016-12-27 10:08:44 -07:00 |
|
|
9ac596187d
|
Properly make hex numbers
|
2016-12-27 09:52:26 -07:00 |
|
|
798539d219
|
Add convenience from_* methods to Sign and Radix
|
2016-12-27 09:52:11 -07:00 |
|
|
0675f17e32
|
Remove char.is_identifier_single()
|
2016-12-27 09:51:24 -07:00 |
|
|
af73947ffd
|
Straighten out the NumberBuilder so it works
Also fix the Number lexing :D
|
2016-12-27 08:18:44 -07:00 |
|
|
bbefd98dbd
|
Some tests for the NumberBuilder
|
2016-12-26 18:41:42 -07:00 |
|
|
aba541ed4d
|
Attempting numbers; tests are failing though :-(
|
2016-12-26 18:23:58 -07:00 |
|
|
9e3d4f155e
|
Rough copy of Number and NumberBuilder
|
2016-12-26 13:58:17 -07:00 |
|
|
59f9b5dd97
|
Dot state
|
2016-12-26 11:51:03 -07:00 |
|
|
7b4d3c62b9
|
Check single character identifiers: +, -
|
2016-12-26 11:37:45 -07:00 |
|
|
d63494fc32
|
Check that forward progress is always made by lexer states
|
2016-12-26 09:15:53 -07:00 |
|
|
b0b9a38932
|
Straighten out test failures
|
2016-12-26 09:15:43 -07:00 |
|
|
0a9da3b7e8
|
Assert invalid characters in states
|
2016-12-26 08:52:15 -07:00 |
|
|
dfc528e8e7
|
Find left vector parens
|
2016-12-25 20:59:21 -07:00 |
|