Merge pull request #12 from UB-CSE443/Sprint1-TokenLocationLogic-NoTask
Sprint1 token location logic no task
This commit is contained in:
@ -8,13 +8,15 @@
|
||||
#include <stdbool.h>
|
||||
#include "typedefs.h"
|
||||
int line_number = 1, column_number = 1;
|
||||
bool DEBUG = true;
|
||||
#ifndef DEBUG
|
||||
#define DEBUG 0
|
||||
#endif
|
||||
%}
|
||||
|
||||
COM ([^*]|\*+[^)*])*
|
||||
ID [A-Za-z_][0-9A-Za-z_]*
|
||||
DIGIT [0-9]
|
||||
CHAR \\n|\\t|\\'|[^'\n\t\\]
|
||||
CHAR \\n|\\t|\\'|[^'\n\t\\]|\\\\
|
||||
/* char can be a newline, tab, an escaped quote, or anything but a single quote, an actual line break, an actual tab, or a backslash by itself (to prevent confusion from escaped quote */
|
||||
SCHAR \\n|\\t|\\\"|[^\"\n\\]
|
||||
/* similar to above, a string Char (SCHAR) is the same as a CHAR except we cannot have double quotes instead of single quotes. Double quotes need to be escaped in Flex unlike single quotes based on documentation */
|
||||
|
Reference in New Issue
Block a user