Closed zl90 closed 1 year ago
There were three problems with my lex input file:
"
quotation marks. They need to be escaped in the file like so: \"
..
which simply increments the col_num
counter. This rule needs to be defined AFTER all my other rules, or else it seems to override the actions of my other rules.col_num
properly. To do that, I needed to access the flex variable yyleng
which represents the length of the matched string. It's used like so: col_num += yyleng;
.
"asdfasd asdf asd"
strings are broken (gets parsed as a series of IDs. Note we may need to switch into a different rule set for this, because we are actively ignoring spaces currently, which will break string literals easily).SYMBOL
does not get lexed.INTEGER
s do not get lexed.ID
s do not get lexed.col_num
is not incrementing properly.