Created
January 25, 2013 06:19
-
-
Save skeet70/4632174 to your computer and use it in GitHub Desktop.
eFSA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eFSA :: (String, String, Int, Int) -> (String, String, Int, Int) | |
eFSA (source, lexeme, col, line) | |
| nextChar == 'e' || nextChar == 'E' && isDigit secondChar | |
= eFSA (tail source, nextChar : lexeme, col + 1, line) | |
| isDigit nextChar | |
= eFSA (tail source, nextChar : lexeme, col + 1, line) | |
| otherwise (source, lexeme, col, line) | |
where | |
nextChar = head source | |
secondChar = snd source |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment