The code I have for handling comments is getting hairy because I forgot about single-ticks within double-quotes. For example,
6015 IF WA=0 THEN PRINT "Error: File '";WF$;"' File not found.": END
That line was getting cut off at the first single tick after the word "File". In the meantime, I've kludged the script to simply pass through any lines with double quotes.
The proper solution would be to write a lexer using flex. Technically, a Context-Free Grammar is equivalent to a regular expression, however, it should be a lot easier to understand and debug.
The code I have for handling comments is getting hairy because I forgot about single-ticks within double-quotes. For example,
That line was getting cut off at the first single tick after the word "File". In the meantime, I've kludged the script to simply pass through any lines with double quotes.
The proper solution would be to write a lexer using flex. Technically, a Context-Free Grammar is equivalent to a regular expression, however, it should be a lot easier to understand and debug.