Allow one-character macros
authorMichael Spang <mspang@csclub.uwaterloo.ca>
Sun, 13 Dec 2009 03:42:35 +0000 (22:42 -0500)
committerMichael Spang <mspang@csclub.uwaterloo.ca>
Tue, 22 Dec 2009 03:11:48 +0000 (22:11 -0500)
Signed-off-by: Michael Spang <mspang@csclub.uwaterloo.ca>
parser.rl

index a434b94..af4adbc 100644 (file)
--- a/parser.rl
+++ b/parser.rl
@@ -88,7 +88,7 @@ using namespace std;
     simple_cmd = cmd_install | cmd_remove;
     start_block = '{' @start_block;
     end_block = '}' @end_block;
-    macro = alpha (alpha | digit | '-' | '+' | '.')+;
+    macro = alpha (alpha | digit | '-' | '+' | '.')*;
     cmd_if = 'if' whitespace+ macro >pkgstart %start_conditional whitespace* start_block whitespace*
              ('else' whitespace* start_block whitespace* ';' @full_conditional | ';' @half_conditional);
     cmd_list = (simple_cmd | cmd_if | whitespace)* end_block?;