-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'lookup-table' into lexer
- Loading branch information
Showing
11 changed files
with
169 additions
and
91 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ $/basis.cm | |
$/smlnj-lib.cm | ||
$/ml-yacc-lib.cm | ||
|
||
src/token.sig | ||
src/token.sml | ||
src/errormsg.sml | ||
|
||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
signature TOKEN = | ||
sig | ||
eqtype token | ||
|
||
val string : string -> int * int -> token | ||
val int : int -> int * int -> token | ||
val id : string -> int * int -> token | ||
val TYPE : int * int -> token | ||
val VAR : int * int -> token | ||
val FUNCTION : int * int -> token | ||
val BREAK : int * int -> token | ||
val OF : int * int -> token | ||
val END : int * int -> token | ||
val IN : int * int -> token | ||
val NIL : int * int -> token | ||
val LET : int * int -> token | ||
val DO : int * int -> token | ||
val TO : int * int -> token | ||
val FOR : int * int -> token | ||
val WHILE : int * int -> token | ||
val ELSE : int * int -> token | ||
val THEN : int * int -> token | ||
val IF : int * int -> token | ||
val ARRAY : int * int -> token | ||
val ASSIGN : int * int -> token | ||
val OR : int * int -> token | ||
val AND : int * int -> token | ||
val GE : int * int -> token | ||
val GT : int * int -> token | ||
val LE : int * int -> token | ||
val LT : int * int -> token | ||
val NEQ : int * int -> token | ||
val EQ : int * int -> token | ||
val DIVIDE : int * int -> token | ||
val TIMES : int * int -> token | ||
val MINUS : int * int -> token | ||
val PLUS : int * int -> token | ||
val DOT : int * int -> token | ||
val RBRACE : int * int -> token | ||
val LBRACE : int * int -> token | ||
val RBRACK : int * int -> token | ||
val LBRACK : int * int -> token | ||
val RPAREN : int * int -> token | ||
val LPAREN : int * int -> token | ||
val SEMICOLON : int * int -> token | ||
val COLON : int * int -> token | ||
val COMMA : int * int -> token | ||
(* TODO: Should this be a token, should it have yypos? *) | ||
val EOF : token | ||
|
||
val isEof : token -> bool | ||
val toString : token -> string | ||
val find : string * int * int -> token | ||
val reset : unit -> unit | ||
end |
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
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
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
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
Oops, something went wrong.