Files
mcDandy-more_math/more_math/Parser/MathExprLexer.tokens
T
mcDandy 5072b191b7 Add tensor ops and parser support
Expose new tensor operations (softmax, softmin, argmin, argmax, unique, flatten, matmul, cross, and related tensor helpers) in the README and add corresponding grammar rules/tokens. Updated MathExpr.g4 to include new func productions and token definitions, and regenerated parser artifacts (MathExprLexer/Parser/Listener/Visitor/UnifiedMathVisitor and .interp/.tokens files). Also includes minor README formatting/typo fixes.
2026-02-10 15:38:47 +01:00

271 lines
2.6 KiB
Plaintext

SIN=1
COS=2
TAN=3
ASIN=4
ACOS=5
ATAN=6
ATAN2=7
SINH=8
COSH=9
TANH=10
ASINH=11
ACOSH=12
ATANH=13
ABS=14
SQRT=15
LN=16
LOG=17
EXP=18
SMIN=19
SMAX=20
TMIN=21
TMAX=22
TNORM=23
SNORM=24
FLOOR=25
CEIL=26
ROUND=27
GAMMA=28
POWE=29
SIGM=30
CLAMP=31
SFFT=32
SIFFT=33
ANGL=34
PRNT=35
PRINT_SHAPE=36
NVL=37
LERP=38
STEP=39
SMOOTHSTEP=40
FRACT=41
RELU=42
SOFTPLUS=43
GELU=44
SIGN=45
MAP=46
EZCONV=47
CONV=48
SWAP=49
PERM=50
RESHAPE=51
RANGE=52
TOPK=53
BOTK=54
PINV=55
SUM=56
MEAN=57
STD=58
VAR=59
QUARTILE=60
PERCENTILE=61
QUANTILE=62
DOT=63
MOMENT=64
ANY=65
ALL=66
EDGE=67
GAUSSIAN=68
MEDIAN=69
MODE=70
CUMSUM=71
CUMPROD=72
TOPK_IND=73
BOTK_IND=74
CUBIC_EASE=75
ELASTIC_EASE=76
SINE_EASE=77
SMOOTHERSTEP=78
DIST=79
REMAP=80
IF=81
ELSE=82
WHILE=83
RETURN=84
PUSH=85
POP=86
CLEAR=87
HAS=88
GET=89
NOISE=90
RAND=91
CAUCHY=92
EXPONENTIAL=93
LOGNORMAL=94
BERNOULLI=95
POISSON=96
COSSIM=97
FLIP=98
COV=99
SORT=100
COUNT=101
APPEND=102
GET_VALUE=103
BATCH_SHUFFLE=104
CROP=105
PAD=106
ARGSORT=107
FOR=108
IN=109
ARGMIN=110
ARGMAX=111
UNIQUE=112
SOFTMAX=113
SOFTMIN=114
FLATTEN=115
CROSS=116
MATMUL=117
TIMESTAMP=118
NONE=119
BREAK=120
CONTINUE=121
TENSOR=122
PLUS=123
MINUS=124
MULT=125
DIV=126
MOD=127
POW=128
GE=129
GT=130
LE=131
LT=132
EQ=133
EQUEALS=134
NE=135
PIPE=136
LPAREN=137
RPAREN=138
COMMA=139
SEMICOLON=140
ARROW=141
LBRACKET=142
RBRACKET=143
QUESTION=144
COLON=145
LBRACE=146
RBRACE=147
NUMBER=148
CONSTANT=149
VARIABLE=150
SL_COMMENT=151
ML_COMMENT=152
WS=153
'sin'=1
'cos'=2
'tan'=3
'asin'=4
'acos'=5
'atan'=6
'atan2'=7
'sinh'=8
'cosh'=9
'tanh'=10
'asinh'=11
'acosh'=12
'atanh'=13
'abs'=14
'sqrt'=15
'ln'=16
'log'=17
'exp'=18
'smin'=19
'smax'=20
'tmin'=21
'tmax'=22
'tnorm'=23
'snorm'=24
'floor'=25
'ceil'=26
'round'=27
'gamma'=28
'pow'=29
'sigm'=30
'clamp'=31
'fft'=32
'ifft'=33
'angle'=34
'print'=35
'lerp'=38
'step'=39
'smoothstep'=40
'fract'=41
'relu'=42
'softplus'=43
'gelu'=44
'sign'=45
'map'=46
'swap'=49
'range'=52
'topk'=53
'botk'=54
'pinv'=55
'sum'=56
'mean'=57
'std'=58
'var'=59
'quantile'=62
'dot'=63
'moment'=64
'any'=65
'all'=66
'edge'=67
'median'=69
'mode'=70
'cumsum'=71
'cumprod'=72
'smootherstep'=78
'remap'=80
'if'=81
'else'=82
'while'=83
'return'=84
'stack_push'=85
'stack_pop'=86
'stack_clear'=87
'stack_has'=88
'stack_get'=89
'cossim'=97
'flip'=98
'cov'=99
'sort'=100
'append'=102
'get_value'=103
'crop'=105
'pad'=106
'argsort'=107
'for'=108
'in'=109
'unique'=112
'softmax'=113
'softmin'=114
'flatten'=115
'break'=120
'continue'=121
'tensor'=122
'+'=123
'-'=124
'*'=125
'/'=126
'%'=127
'^'=128
'>='=129
'>'=130
'<='=131
'<'=132
'=='=133
'='=134
'!='=135
'|'=136
'('=137
')'=138
','=139
';'=140
'->'=141
'['=142
']'=143
'?'=144
':'=145
'{'=146
'}'=147