rust/mk
bors 4e4e8cff16 Auto merge of #21452 - bleibig:bison-grammar, r=nikomatsakis
This adds a new lexer/parser combo for the entire Rust language can be generated with with flex and bison, taken from my project at https://github.com/bleibig/rust-grammar. There is also a testing script that runs the generated parser with all *.rs files in the repository (except for tests in compile-fail or ones that marked as "ignore-test" or "ignore-lexer-test"). If you have flex and bison installed, you can run these tests using the new "check-grammar" make target.

This does not depend on or interact with the existing testing code in the grammar, which only provides and tests a lexer specification.

OS X users should take note that the version of bison that comes with the Xcode toolchain (2.3) is too old to work with this grammar, they need to download and install version 3.0 or later.

The parser builds up an S-expression-based AST, which can be displayed by giving the "-v" argument to parser-lalr (normally it only gives output on error). It is only a rough approximation of what is parsed and doesn't capture every detail and nuance of the program.

Hopefully this should be sufficient for issue #2234, or at least a good starting point.
2015-01-24 22:14:14 +00:00
..
cfg rollup merge of #21414: ejjeong/aarch64-linux-android 2015-01-21 09:15:59 -08:00
clean.mk debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
crates.mk regex: Remove in-tree version 2015-01-23 21:04:10 -08:00
ctags.mk Fix make TAGS.emacs. 2014-12-16 17:08:49 +01:00
debuggers.mk debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
dist.mk mk: Add rustbook to source dist 2015-01-08 17:03:40 -08:00
docs.mk Ensure that the book is built after the doc/ directory. 2015-01-09 20:26:31 +11:00
grammar.mk Add a LALR grammar for Rust with testing support 2015-01-20 18:47:17 -08:00
host.mk mk: Add space before line continuation backslash 2014-07-23 08:44:11 -07:00
install.mk Fix make install dependencies 2015-01-03 09:49:51 +01:00
llvm.mk Don't use the same llvmdeps.rs for every host. 2014-11-25 17:28:49 -06:00
main.mk mk: Don't set RUSTC_BOOTSTRAP_KEY on -dev and -nightly. Not needed 2015-01-17 16:37:34 -08:00
perf.mk
platform.mk powerpc: Use toolchain assembler on power 2015-01-11 21:14:30 -08:00
prepare.mk iOS: fixed install phase 2015-01-12 10:09:47 +02:00
reconfig.mk Correct building documenation with Pandoc and TeX on Windows. 2014-11-06 18:08:33 +03:00
rt.mk Initial support for aarch64-linux-android 2015-01-20 17:43:15 +09:00
rustllvm.mk Add LLVM ExecutionEngine API 2014-12-11 15:33:27 -07:00
snap.mk mk: Remove extra whitespace before line continuation backslashes 2014-07-23 08:41:55 -07:00
stage0.mk mk/stage0: complain instead of creating an empty file 2014-11-20 16:00:12 -05:00
target.mk mk: Use host llvm linkage paths, not target ones 2014-11-30 00:01:19 -08:00
tests.mk rollup merge of #21289: brson/errorcodes 2015-01-21 09:13:46 -08:00
util.mk mk: Address review feedback 2014-02-14 19:17:50 -08:00