6aed66d2b5
[parser] Add ProgramParser in its own module
2018-08-23 20:20:12 -07:00
4fa07ceec7
[lexer] Add Error::msg()
2018-08-23 20:19:16 -07:00
4cd46d85a9
[parser] Improve this error message
2018-08-23 18:04:56 -07:00
9c06b293f9
[parser] Determine when to parse a new list and when to prepare to parse the current list
2018-08-23 18:04:44 -07:00
8e9fde7a9f
[parser, types] Add Obj::take() and use it to take the Obj from the parser when it is done
2018-08-23 18:04:04 -07:00
929846152e
[parser, types] Clean up obj parsers
...
- Define ListParser, SymParser in their own separate modules
- Add some stuff to types to make working with them more ergonomic
2018-08-23 17:52:56 -07:00
b6a9b8a855
Merge branch 'chars-lexer'
2018-08-23 17:08:47 -07:00
7de3bfcabb
Merge branch 'object-trait' into chars-lexer
2018-08-23 17:08:24 -07:00
d825d0ec8a
[types] Clean up Pair and Sym types
...
Reconfigure the top-level object types.
- Obj is an enum pointer type
- Object is a trait that all Scheme types should implement
Define Sym, a symbol type.
Define Pair, a pair/cons/list type.
Implement Display for all types above. Implement casting methods for the above.
2018-08-23 17:05:29 -07:00
f197f1ba8b
Rename predicates -> preds
2018-08-23 07:53:04 -07:00
234b60dde9
Some spacing tweaks to predicates
2018-08-20 16:31:10 -07:00
a81e9b4258
I guess we're doing this again...
2018-08-20 16:30:59 -07:00
0208ecb4d2
[parser] Continuing to sketch the parser
2018-08-20 16:14:17 -07:00
5a5a0c9c07
Add ObjectPtr::new_pair()
2018-08-20 15:21:38 -07:00
8475720a71
Add accessor for Lex::value
2018-08-20 15:21:20 -07:00
cabe40bd7a
[parser] Skeleton IdParser and ListParser for Ids and Lists respectively
2018-08-19 22:30:49 -07:00
281c29ee26
[lexer] Expose token field via method; Clone and Copy Tokens
2018-08-19 22:30:19 -07:00
027854d162
[parser] Print things in main() as the thing
2018-08-19 22:11:08 -07:00
d7bffdc432
[parser] Add parsers field to Parser
...
This will be a stack of node-specific parsers. As you descend the tree, a new
parser will be created for each node we visit.
2018-08-19 22:04:05 -07:00
52ede10d5e
[parser] Remove program.rs
2018-08-19 21:15:07 -07:00
6de9ff6695
[types] Fix the tests
2018-08-17 17:18:01 -07:00
cc43ffd135
[lexer] Lexer emits Lexes instead of Tokens
2017-06-26 21:54:57 -07:00
5f3770914f
[lexer] Basic handling of input offsets
2017-06-26 21:54:05 -07:00
efe0c27d93
Make the Parser dump tokens and quit
...
Write a main() for sibilparser that just does that.
2017-06-18 17:34:46 -07:00
2a7626c75f
Add a type def for lexer Result
2017-06-18 16:50:14 -07:00
d994316392
Character checks for identifier initial and subsequent
2017-05-13 17:21:23 -07:00
237dca4b4b
Add some character class methods to a Lexable trait for char
2017-05-13 15:37:01 -07:00
1dfdc001b3
Add an error class
2017-05-13 15:26:41 -07:00
b5f76deb98
Add some single token tests for the tokens we have
2017-05-02 21:45:10 -07:00
28e5814101
Check for EOF (aka input.next() -> None) and emit what we have before finishing forever
2017-05-02 21:44:57 -07:00
5fe10fe002
Simplify the resume check -- just use an if
2017-05-02 21:44:01 -07:00
c5b769ff45
A peekable lexer
...
Use the chars() iterator on &str, with the Peekable wrapper on Iterators, to iterate the input, rather than needing to hold the whole input and do iteration by indexes.
2017-04-30 17:46:42 -07:00
a4282e7760
Blow away the lexer code =o
2017-04-30 16:32:31 -07:00
4d3366db84
First attempt at Display for Object::Vector
2017-04-30 16:01:11 -07:00
31c68034a8
Fix a good portion of the build errors in sibillexer (but not all...)
2017-04-30 16:00:51 -07:00
f21148381e
Make sibiltypes::char public
2017-04-30 15:57:29 -07:00
027daf692b
lexer::number uses sibiltypes::Object
2017-04-30 15:57:16 -07:00
21263fb2ed
Lexer doesn't have a named_char module anymore
2017-04-30 15:57:02 -07:00
a88bf20a23
Derive Eq on lexer::number::Sign
2017-04-30 15:56:49 -07:00
28ba98582a
More compact formatting
2017-04-30 15:56:32 -07:00
9183e05891
Add FromChar trait to lexer::char
2017-04-30 15:56:21 -07:00
3ffb694ce1
Move Exact to types::number
2017-04-30 15:55:50 -07:00
d783e561da
Strip down the parser (again...)
2017-04-29 08:58:02 -07:00
0133bbed19
[types] Move Char trait down to just above impl
2017-04-23 17:11:56 -07:00
1430bdad29
Make a Char trait that provides some handy methods for Object::Char
2017-04-23 10:57:08 -07:00
fd5df91e27
[lexer,types] Move named_char to types as types/char/names.rs
...
Move char.rs to be char/mod.rs
2017-04-23 10:41:47 -07:00
5cb66d932f
[lexer] Clean up named_char module
2017-04-23 10:02:39 -07:00
38be7d2eee
Expose ObjectPtr and ObjectPtr::new from sibiltypes
2017-04-23 09:23:03 -07:00
076d391d4b
Remove list.rs from the parser
2017-04-22 15:22:48 -07:00
a5f88c221d
Use Objects for Token values
2017-04-22 15:21:13 -07:00