aboutsummaryrefslogtreecommitdiffstats
path: root/1-lexer.md
diff options
context:
space:
mode:
authorm8pple <dt10@imperial.ac.uk>2017-02-01 11:59:02 +0000
committerGitHub <noreply@github.com>2017-02-01 11:59:02 +0000
commitb42d4b5940b28093d941c117ff376b556917c43e (patch)
tree79b7ccccd49ec2f22ffdf90baf6c176953e90e69 /1-lexer.md
parente44c3dcbf4d85315e7fffc7c3c0717293f40fb1b (diff)
downloadCompiler-b42d4b5940b28093d941c117ff376b556917c43e.tar.gz
Compiler-b42d4b5940b28093d941c117ff376b556917c43e.zip
Fix bug in updated string literal notes. Thanks to @MK2020. Closes #8
Diffstat (limited to '1-lexer.md')
-rw-r--r--1-lexer.md7
1 files changed, 3 insertions, 4 deletions
diff --git a/1-lexer.md b/1-lexer.md
index 8f91d71..34b6c8d 100644
--- a/1-lexer.md
+++ b/1-lexer.md
@@ -161,15 +161,14 @@ matter.
There is some [ambiguity](#2) over the string literals, which might
or might not include the quotes. _Both_ forms will be accepted as
-value, so this:
-Another session for a different lexer could be (preferred):
+value, so another session for a different lexer could be (preferred):
````
$ cat wibble.c
z="wibble"
$ cat wibble.c | bin/c_lexer
[ { "Class" : "Identifier", "Text": "z" },
{ "Class" : "Operator", "Text": "=" },
- { "Class" : "StringLiteral", "Text": "z" }
+ { "Class" : "StringLiteral", "Text": "wibble" }
]
````
or
@@ -178,7 +177,7 @@ or
$ cat wibble.c | bin/c_lexer
[ { "Class" : "Identifier", "Text": "z" },
{ "Class" : "Operator", "Text": "=" },
- { "Class" : "StringLiteral", "Text": "\"z\"" }
+ { "Class" : "StringLiteral", "Text": "\"wibble\"" }
]
````