b-frechette / C-S20

University of Idaho CS 445 compiler for the C- (Version S20) language.
2 stars 0 forks source link

Fix CHARCONST #14

Closed b-frechette closed 4 years ago

b-frechette commented 4 years ago

With the validation of the question of char validity #11 from Heckendorn there are a couple things that need to be addressed and fixed:

  1. Fix \t command that enters it into the char as the tab character. This was an erroneous assumption and should instead just return the character t. i.e. Value: 't' Input: '\t'

  2. Hard code the single quotes around the value in the print statement, similar to the STRINGCONST solution.

to be noted that the Value returned in the statement must be a char variable

Output should look like: Line 1 Token: CHARCONST Value: 'a' Input: 'a'

b-frechette commented 4 years ago

Ask and double check the grammar on what to do with the following cases" ''' or '' I am unsure why this acts differently than how the STRINGCONST one does and I am confused how I didn't clear this up in class with him. He did say that '\' should just return a CHARCONST giving the output of the ', but how am I going to error out?

b-frechette commented 4 years ago

This is being considered solved, I tested against all available test cases and it matched the test output completely as of 01/02.