From 6f3fa80b37ca5f8d992f5d6f66aee77ead303bf4 Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Mon, 26 May 2025 14:42:35 +0200 Subject: Symbol table --- tokenizer.sig | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tokenizer.sig') diff --git a/tokenizer.sig b/tokenizer.sig index 3a711a4..67666a4 100644 --- a/tokenizer.sig +++ b/tokenizer.sig @@ -1,4 +1,5 @@ signature TOKENIZER = sig + structure ST: SYMTAB structure S: STREAM datatype intType = ItDec | ItOct | ItHex @@ -13,11 +14,11 @@ signature TOKENIZER = sig Invalid | EOS | NewLine | - MacroEnd of string | + MacroEnd of int | Num of numConst | - Id of string | + Id of int | CharConst of string * int | StringConst of string | @@ -123,8 +124,10 @@ signature TOKENIZER = sig PpcError | PpcPragma - val getToken: S.t -> token * S.pos * S.t - val Ptk: (token, 'a, 'b, 'c) a1printer + val initSymtab: unit -> token ST.t + + val getToken: token ST.t -> S.t -> token * S.pos * S.t + val Ptk: (token ST.t, token, 'a, 'b, 'c) a2printer val isPpcDir: token -> bool val debugPrint: string -> unit -- cgit v1.2.3