diff options
author | Ben Smith <binjimin@gmail.com> | 2017-08-15 14:36:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-15 14:36:20 -0700 |
commit | 3d3920f6d9388c46af6725dabb34d98752958d8d (patch) | |
tree | cf77acb6d4140b2fb791f91d4af38d59ad8f66a3 /scripts | |
parent | 68e8642fea319253466bb3bddece75306f808a69 (diff) | |
download | wabt-3d3920f6d9388c46af6725dabb34d98752958d8d.tar.gz wabt-3d3920f6d9388c46af6725dabb34d98752958d8d.tar.bz2 wabt-3d3920f6d9388c46af6725dabb34d98752958d8d.zip |
Rewrite parser as recursive descent (#591)
* 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
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/travis-before-install.sh | 4 | ||||
-rwxr-xr-x | scripts/travis-build.sh | 4 | ||||
-rwxr-xr-x | scripts/travis-test.sh | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/scripts/travis-before-install.sh b/scripts/travis-before-install.sh index ea750026..134c93bf 100755 --- a/scripts/travis-before-install.sh +++ b/scripts/travis-before-install.sh @@ -18,11 +18,11 @@ if [[ ${TRAVIS_OS_NAME} = "linux" ]]; then sudo add-apt-repository ppa:jbboehr/build-deps -y # For re2c 0.16. sudo apt-get update -qq - sudo apt-get install -qq re2c bison gcc-4.8-multilib g++-4.8-multilib -y + sudo apt-get install -qq re2c gcc-4.8-multilib g++-4.8-multilib -y sudo pip install flake8 elif [[ ${TRAVIS_OS_NAME} = "osx" ]]; then brew update - brew install re2c bison + brew install re2c else echo "unknown TRAVIS_OS_NAME: ${TRAVIS_OS_NAME}" exit 1 diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh index 24b54e25..5bb56892 100755 --- a/scripts/travis-build.sh +++ b/scripts/travis-build.sh @@ -26,8 +26,8 @@ if [[ ${TRAVIS_OS_NAME} = "linux" ]]; then fi if [[ ${COMPILER} = "gcc" ]]; then - # Build without re2c/bison to test prebuilt C sources - make gcc-debug-no-re2c-bison + # Build without re2c to test prebuilt C sources + make gcc-debug-no-re2c elif [[ ${COMPILER} = "clang" && -z ${SANITIZER:-} ]]; then # Test building without GTest submodule make clang-debug-no-tests diff --git a/scripts/travis-test.sh b/scripts/travis-test.sh index 3b7c9a13..3ce6e0b2 100755 --- a/scripts/travis-test.sh +++ b/scripts/travis-test.sh @@ -46,7 +46,7 @@ set_run_test_args() { } if [ ${CC} = "gcc" ]; then - if set_run_test_args gcc Debug no-re2c-bison; then + if set_run_test_args gcc Debug no-re2c; then run_tests fi fi |