summaryrefslogtreecommitdiff
path: root/src/circular-array.h
Commit message (Collapse)AuthorAgeFilesLines
* Run clang-format over all the files (#814)Ben Smith2018-03-161-23/+11
| | | | I also fixed some for/if to use braces if I noticed it. This is a non-functional change.
* Support non-POD types in CircularArray (#625)Ben Smith2017-09-131-11/+30
| | | | | This is necessary if we want to allow Token to have a destructor. Also add some tests for the API.
* Rewrite parser as recursive descent (#591)Ben Smith2017-08-151-2/+7
| | | | | | | | | | | | | | | | | | * 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. (#519)KarlSchimpf2017-06-231-2/+3
| | | | | | | | | | | | * 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.
* Modify lexer to look past parenthesis when needed for conflicts. (#506)KarlSchimpf2017-06-171-0/+110
* 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.