Add rerun_except crate, and small example code

* rerun_except will ensure a build doesn't rerun if a *.not file is
  modified, which it would otherwise do
* Add examples/expr.not with some basic assignment statements and
  function calls

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-09-17 13:26:38 -07:00
parent 1be0fb8a04
commit 38b7124fe2
3 changed files with 11 additions and 0 deletions

View File

@@ -1,8 +1,13 @@
use cfgrammar::yacc::YaccKind;
use lrlex::LexerBuilder;
use lrpar::CTParserBuilder;
use rerun_except::rerun_except;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Skip rerunning if it's just *.not files that have changed
rerun_except(&["*.not"]).unwrap();
// Build parser + lexer
let mut parser_builder = CTParserBuilder::new()
.yacckind(YaccKind::Grmtools)
.error_on_conflicts(false);