summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/commandline.lalrpop13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/commandline.lalrpop b/src/commandline.lalrpop
index dd7d84e..15af3cf 100644
--- a/src/commandline.lalrpop
+++ b/src/commandline.lalrpop
@@ -1,7 +1,7 @@
 grammar;
 
 pub Invocation: Vec<&'input str> = {
-  <WORD+> NEWLINE,
+  <WORD*> NEWLINE,
 };
 
 // Several of the regexps below make use of Unicode character classes. [1] is
@@ -49,11 +49,12 @@ match {
   // token for them makes the error messages more informative.
   r"[\p{C}&&[^\n\r]]" => CONTROL,
 
-  // Z is the unicode class for separators, including line, paragraph, and space
-  // separators. C is the class for control characters. This regexp tests for
-  // the intersection of the negation of these character classes, along with a
-  // negated class enumerating all the explicitly-recognized characters, which
-  // means it matches any character NOT in the regexps above.
+  // Z is the unicode class for separators, which is exhaustively partitioned
+  // into line, paragraph, and space separators. Each of those subclasses is
+  // handled above. C is the class for control characters. This regexp tests
+  // for the intersection of the negation of these character classes, along
+  // with a negated class enumerating all the explicitly-recognized characters,
+  // which means it matches any character NOT in the regexps above.
   //
   // Note that, counterintuitively, line feed and carriage return are classified
   // as control characters, not as line separators. Either way, this regexp would