[muddle] [PATCH] Define rule for string
Jason Self
j at jxself.org
Sat Feb 24 10:14:50 PST 2018
A string is any sequence of zero of more characters beginning and
ending with a quotation mark. An empty string is a valid string. A
string may not contain a quotation mark unless it is first escaped
with a backslash.
Signed-off-by: Jason Self <j at jxself.org>
---
ebnf.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ebnf.txt b/ebnf.txt
index 712ef6b..953503d 100644
--- a/ebnf.txt
+++ b/ebnf.txt
@@ -25,4 +25,6 @@ fix = ( "*" , base8 , { base8 } , "*" ) | ( [ ( "+" | "-" ) ] ,
[ ( "+" | "-" ) ] , digit , { digit } ] ) ;
float = [ ( "+" | "-" ) ] , { digit } , "." , digit ,
- [ ( "e" | "E" ) , [ ( "+" | "-" ) ] , digit , { digit } ] ;
\ No newline at end of file
+ [ ( "e" | "E" ) , [ ( "+" | "-" ) ] , digit , { digit } ] ;
+
+string = '"' , [ { ( character - '"' ) | '\"' } ] , '"' ;
\ No newline at end of file
--
1.9.1
More information about the muddle
mailing list