From e0be1c7a3a2e5a3955dbc16d22709bdd383a8a5f Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Tue, 5 May 2026 15:16:38 +0100 Subject: [PATCH] add dfa for longIDs (which are used for accessing things from structures/modules) --- compiler/scanner.sml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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