Make changes suggested by Ryan
This commit is contained in:
@@ -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" >}}).
|
||||
|
||||
Reference in New Issue
Block a user