Say I have something similar to this: http://faculty.utpa.edu/chebotkoa/main/teaching/csci3336spring2013/slides/lexsyn/sample-lex-syn.html
Does anyone know how I would be able to make "\n" or "\t" recognized as a token? I would probably need to add a case for it in the switch in LexicalAnalysis.cpp, right? And add it to the state diagram? But how would I modify SyntaxAnalysis.cpp? Would I do something like:
if (nextToken == NEWLINE){
nextToken = LA.lex();
}
or would I have to do "\" and "n" separately?
if (nextToken == "\"){
nextToken = LA.lex();
if(nextToken == "n"){
nextToken = LA. lex();
}
}