In Alex
I have a rule that looks like this
^@ident\:$ {TLabel (init s)}
So, a single line that starts with an identifier followed by a colon and then the end of the line.
This works fine unless the line is the last in the file and there is not a \n
at the end. When that happens the $
does not match and the scan fails. What do I need to do to match either the end of the line (\n
) or the end of the file?