From 9059f2d47473c2700b7c9c19625c544ec4102cfa Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sun, 23 Oct 2016 17:12:43 -0700 Subject: [PATCH] Delete the grammar file It was almost always wrong anyways. --- grammar.txt | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 grammar.txt diff --git a/grammar.txt b/grammar.txt deleted file mode 100644 index 7c5facf..0000000 --- a/grammar.txt +++ /dev/null @@ -1,34 +0,0 @@ -Justfile grammar is a little weird. Because of the freeform -nature of recipe bodies, we don't tokenize them with the -same rules as the rest of the justfile. Instead the -tokenizer will emit a INDENT at the beginning of a recipe -body, one or more LINEs, which match everything after the -INDENT whitespace, and a DEDENT at the end. - -Thus the lexer is context sensitive, which is a little -gross. - -tokens: - -NAME = /[a-z]((_|-)?[a-z0-9])*/ -EOL = /\n|\r\n/ -COMMENT = /#[^!].*/ -COLON = /:/ -INDENT = emitted when indentation increases -DEDENT = emitted when indentation decreases -LINE = /.*/ only emitted between INDENT/DEDENT pairs, doesn't include INDENT whitespace -EOF = emitted at the end of input - -grammar: - -justfile = item* EOF - -item = COMMENT - | recipe - | EOL - -assignment = NAME EQUALS expression COMMENT? EOL - -expression = STRING - -recipe = NAME+ COLON NAME* EOL (INDENT LINE+ DEDENT)?