diff --git a/compiler/scanner.sml b/compiler/scanner.sml index 7266d25..577bf6f 100644 --- a/compiler/scanner.sml +++ b/compiler/scanner.sml @@ -4,8 +4,13 @@ struct val intDfa = Dfa.fromString "[0-9]+" val wordDfa = Dfa.fromString "0w[0-9]+" - val realDfa = "[0-9]+.[0-9]+" + val realDfa = Dfa.fromString "[0-9]+.[0-9]+" + val idDfa = Dfa.fromString "[a-zA-Z][a-zA-Z0-9_']*" + val longIdDfa = + Dfa.fromString "[a-zA-Z[(a-zA-Z0-9_']*(\\.[a-zA-Z][a-zA-Z0-9_']*)+" + + Hello.world fun skipFormattingChars (str, pos) = if pos = String.size str then