Closed b-frechette closed 4 years ago
This is at the moment is solved, currently waiting back for #13 word from Heckendorn, but at the moment the regular expression for STRINGCONST is as follows:
\"(\\.|[^"\n])*\"
ensuring that there is an error with an unescaped " beyond the ending one.
This solution is being considered solved, I tested it against the most recent fix and test cases with the homework server and it matched all of them perfectly.
The string const, as stated by Heckendorn on 01/28, the input will be the value from yytext(), the value will be parsed in the following way:
In the string const all the meta-characters must be correctly stored as their chars, including that of \n and \0, need to check the example output on the needs of \t.
For the single quotes around the parsed value Heckendorn stated that he put those in the print statement. So, it will look something like this, instead of doing that while parsing out the meta-characters:
printf("Value: '%s'", $1->stringValue);
Output should look like:
Line 1 Toke: STRINGCONST Value: 'dog' Input: "dog"