stehau
This commit is contained in:
56
W2/calculator/Parser.fsi
Normal file
56
W2/calculator/Parser.fsi
Normal file
@ -0,0 +1,56 @@
|
||||
// Signature file for parser generated by fsyacc
|
||||
module Parser
|
||||
type token =
|
||||
| SUM
|
||||
| PROD
|
||||
| MAX
|
||||
| ARGMAX
|
||||
| PLUS
|
||||
| MINUS
|
||||
| TIMES
|
||||
| LET
|
||||
| IN
|
||||
| TO
|
||||
| OF
|
||||
| EOF
|
||||
| LPAR
|
||||
| RPAR
|
||||
| EQ
|
||||
| VAR of (string)
|
||||
| INT of (int)
|
||||
type tokenId =
|
||||
| TOKEN_SUM
|
||||
| TOKEN_PROD
|
||||
| TOKEN_MAX
|
||||
| TOKEN_ARGMAX
|
||||
| TOKEN_PLUS
|
||||
| TOKEN_MINUS
|
||||
| TOKEN_TIMES
|
||||
| TOKEN_LET
|
||||
| TOKEN_IN
|
||||
| TOKEN_TO
|
||||
| TOKEN_OF
|
||||
| TOKEN_EOF
|
||||
| TOKEN_LPAR
|
||||
| TOKEN_RPAR
|
||||
| TOKEN_EQ
|
||||
| TOKEN_VAR
|
||||
| TOKEN_INT
|
||||
| TOKEN_end_of_input
|
||||
| TOKEN_error
|
||||
type nonTerminalId =
|
||||
| NONTERM__startProg
|
||||
| NONTERM_Prog
|
||||
| NONTERM_Exp
|
||||
/// This function maps tokens to integer indexes
|
||||
val tagOfToken: token -> int
|
||||
|
||||
/// This function maps integer indexes to symbolic token ids
|
||||
val tokenTagToTokenId: int -> tokenId
|
||||
|
||||
/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production
|
||||
val prodIdxToNonTerminal: int -> nonTerminalId
|
||||
|
||||
/// This function gets the name of a token as a string
|
||||
val token_to_string: token -> string
|
||||
val Prog : (FSharp.Text.Lexing.LexBuffer<'cty> -> token) -> FSharp.Text.Lexing.LexBuffer<'cty> -> (AbSyn.EXP)
|
Reference in New Issue
Block a user