| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
I also fixed some for/if to use braces if I noticed it. This is a
non-functional change.
|
|
|
|
|
| |
This is necessary if we want to allow Token to have a destructor.
Also add some tests for the API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove Bison dependency
* Remove pre-generated parser files
* Rename build config from no-re2c-bison to no-re2c
* Add a simple make_unique implementation
* Move handling of module bindings into ir.cc
* Simplify lexer
- Remove lookahead, the parser handles this now
- Unify Token/LexerToken, it only contains terminal values now
- Refactor setting token type and value into one function (e.g.
LITERAL, RETURN => RETURN_LITERAL)
* New Parser
- Uses two tokens of lookahead (use Peek(0) or Peek(1))
- Consume() consumes one token of any kind
- Match(t) consumes the current token if it matches
- PeekMatch(t) returns true iff the token matches, but doesn't consume
- Basic error synchronization; plenty of room for improvement here
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix circular array to create/destroy elements.
* Be consistent with references to the element type.
* Use std::array to manage contents of circular array.
* Let the compiler build the default destructor for circular array.
* Define a constructor for Token, so that circular array is initialized.
|
|
* Add framework for a lookahead queue.
* test single case of using lookahead.
* Save getToken arguments in lexer state.
* Show lookahead token queue works.
* Modify wast parser to use lookahead for catch and catch_all.
* Do some clean ups.
* Clean up lexer to always read tokens into the lookahead queue.
* Use lookahead queue to hold all tokens.
* Save token values into lookahead tokens.
* Clean up code.
* Simplify rules for a parenthesized try block.
* Make catch_expr_list a left-recursive rule.
* Remove circ_array.push_front(). Not used.
* Fix issues raised by binji.
|