Make changes suggested by Ryan

This commit is contained in:
2019-08-28 13:34:35 -07:00
parent 3f1db0aa13
commit df1101a14c
4 changed files with 13 additions and 5 deletions

View File

@@ -142,7 +142,7 @@ C++ code that should be executed when the regular expression is matched.
The first token: whitespace. This includes the space character,
and the newline character. We ignore it, so its rule is empty. After that,
we have the regular expressions for the tokens we've talked about. For each, I just
print a description of the token that matched. This will change we we hook this up to
print a description of the token that matched. This will change when we hook this up to
a parser, but for now, this works fine. Notice that the variable `yytext` contains
the string matched by our regular expression. This variable is set by the code flex
generates, and we can use it to get the extract text that matched a regex. This is
@@ -170,3 +170,6 @@ TIMES
NUMBER: 6
```
Hooray! We have tokenizing.
With our text neatly divided into meaningful chunks, we
can continue on to [Part 2 - Parsing]({{< relref "02_compiler_parsing.md" >}}).