PN_AST 37 core/ast.c t->part = (enum PN_AST)p; PN_AST 680 core/compile.c blk->a[0] = PN_SRC(PN_AST(CODE, PN_NIL, blk->loc.lineno, blk->line)); PN_AST 682 core/compile.c PN_PUSH(ctor, PN_AST(EXPR, PN_TUP(PN_AST(MSG, PN_AST 425 core/potion.h enum PN_AST part; ///< AST type, avoid -Wswitch (aligned access: 4+4+8+4+24) PN_AST 72 syn/syntax-p5.y { $$ = P->source = PN_AST(CODE, s); PN_AST 79 syn/syntax-p5.y # block = '{' s:lineseq '}' { $$ = PN_AST(BLOCK, s) } PN_AST 90 syn/syntax-p5.y | i:ifstmt { $$ = PN_AST(EXPR, i) } PN_AST 95 syn/syntax-p5.y { $$ = PN_OP(AST_AND, PN_AST(NOT, e), a) } PN_AST 101 syn/syntax-p5.y { $$ = PN_OP(AST_AND, PN_AST(NOT, e), a) } PN_AST 107 syn/syntax-p5.y | l:list sep? { $$ = PN_AST(EXPR, l) } PN_AST 128 syn/syntax-p5.y p5-siglist = list-start args2* list-end { $$ = PN_AST(LIST, P->source); P->source = PN_NIL } PN_AST 131 syn/syntax-p5.y { $$ = PN_AST2(ASSIGN, PN_AST(EXPR, PN_TUP(PN_AST(MSG, n))), PN_AST 132 syn/syntax-p5.y PN_AST(EXPR, PN_TUP(PN_AST2(PROTO, l, b)))) } PN_AST 134 syn/syntax-p5.y { $$ = PN_AST2(ASSIGN, PN_AST(EXPR, PN_TUP(PN_AST(MSG, n))), PN_AST 135 syn/syntax-p5.y PN_AST(EXPR, PN_TUP(PN_AST2(PROTO, PN_AST(LIST, PN_NIL), b)))) } PN_AST 146 syn/syntax-p5.y { p2_eval(P, PN_AST(BLOCK, PN_TUP(PN_AST2(MSG, PN_use, PN_AST(LIST, PN_PUSH(PN_TUP(u), v)))))) } PN_AST 150 syn/syntax-p5.y { p2_eval(P, PN_AST(BLOCK, PN_TUP(PN_AST2(MSG, PN_use, PN_AST(LIST, PN_PUSH(PN_TUP(u), n)))))) } PN_AST 152 syn/syntax-p5.y { p2_eval(P, PN_AST(BLOCK, PN_TUP(PN_AST2(MSG, PN_use, PN_AST(LIST, PN_PUSH(u,PN_PUSH(PN_PUSH(PN_TUP(u),n),l))))))) } PN_AST 158 syn/syntax-p5.y | IF e:ifexpr s1:block { $$ = e = PN_AST3(MSG, PN_if, PN_AST(LIST, PN_TUP(e)), s1) } PN_AST 159 syn/syntax-p5.y (ELSIF e1:ifexpr f:block { $$ = e = PN_PUSH(PN_TUPIF(e), PN_AST3(MSG, PN_elsif, PN_AST(LIST, PN_TUP(e1)), f)) } )* PN_AST 174 syn/syntax-p5.y }); $$ = PN_AST(EXPR, s1) } PN_AST 178 syn/syntax-p5.y }); $$ = PN_AST(EXPR, s1) } PN_AST 243 syn/syntax-p5.y expr = c:method { $$ = PN_AST(EXPR, c) } PN_AST 246 syn/syntax-p5.y $$ = PN_AST(EXPR, PN_TUP(m)) } PN_AST 247 syn/syntax-p5.y | c:calllist { $$ = PN_AST(EXPR, c) } PN_AST 248 syn/syntax-p5.y | c:call e:expr { $$ = PN_AST(EXPR, PN_PUSH(PN_TUPIF(PN_S(e,0)), PN_AST 254 syn/syntax-p5.y | c:call { $$ = PN_AST(EXPR, c) } PN_AST 257 syn/syntax-p5.y eatom = e:atom { $$ = PN_AST(EXPR, PN_TUPIF(e)) } PN_AST 259 syn/syntax-p5.y opexpr = not e:expr { $$ = PN_AST(NOT, e) } PN_AST 260 syn/syntax-p5.y | bitnot e:expr { $$ = PN_AST(WAVY, e) } PN_AST 261 syn/syntax-p5.y | minus e:expr { $$ = PN_OP(AST_MINUS, PN_AST(VALUE, PN_ZERO), e) } PN_AST 273 syn/syntax-p5.y special = < ( "foreach"|"for"|"while"|"class"|"if"|"elseif" ) > - { $$ = PN_AST(MSG, PN_STRN(yytext, yyleng)) } PN_AST 283 syn/syntax-p5.y { PN_SRC(m)->a[1] = PN_SRC(PN_AST(LIST, PN_NIL)); $$ = PN_TUP(m) } PN_AST 287 syn/syntax-p5.y { PN_SRC(m)->a[1] = PN_SRC(PN_AST(LIST, l)); $$ = PN_TUP(m) } PN_AST 294 syn/syntax-p5.y name = !keyword m:id - { $$ = PN_AST(MSG, m) } PN_AST 295 syn/syntax-p5.y | !keyword m:funcvar - { $$ = PN_AST(MSG, m) } PN_AST 307 syn/syntax-p5.y # | m:msg { $$ = PN_AST(LICK, m) } PN_AST 310 syn/syntax-p5.y | k:unquoted - fatcomma v:atom { $$ = PN_AST2(ASSIGN, PN_AST(VALUE, k), v) } PN_AST 317 syn/syntax-p5.y # | v:unquoted { $$ = PN_AST(VALUE, v) } PN_AST 321 syn/syntax-p5.y block = block-start s:statements - block-end { $$ = PN_AST(BLOCK, s) } PN_AST 322 syn/syntax-p5.y list = list-start s:listexprs - list-end { $$ = PN_AST(LIST, s) } PN_AST 323 syn/syntax-p5.y | list-start list-end { $$ = PN_AST(LIST, PN_NIL) } PN_AST 324 syn/syntax-p5.y listref = listref-start s:listexprs - listref-end { $$ = PN_AST(LIST, s) } PN_AST 325 syn/syntax-p5.y | listref-start listref-end { $$ = PN_AST(LIST, PN_NIL) } PN_AST 326 syn/syntax-p5.y hash = hash-start h:hash-items - hash-end { $$ = PN_AST(LIST, h) } PN_AST 327 syn/syntax-p5.y | hash-start hash-end { $$ = PN_AST(LIST, PN_NIL) } PN_AST 333 syn/syntax-p5.y mvalue = i:immed - { $$ = PN_AST(VALUE, i) } PN_AST 339 syn/syntax-p5.y value = i:immed - { $$ = PN_AST(VALUE, i) } PN_AST 359 syn/syntax-p5.y { $$ = PN_AST(MSG, PN_STRCAT("$", PN_STR_PTR(i))) } PN_AST 360 syn/syntax-p5.y listvar = < '@' i:id > - { $$ = PN_AST(MSG, PN_STRCAT("@", PN_STR_PTR(i))) } PN_AST 361 syn/syntax-p5.y hashvar = < '%' i:id > - { $$ = PN_AST(MSG, PN_STRCAT("%", PN_STR_PTR(i))) } PN_AST 362 syn/syntax-p5.y funcvar = < '&' i:id > - { $$ = PN_AST(MSG, PN_STRCAT("&", PN_STR_PTR(i))) } PN_AST 363 syn/syntax-p5.y globvar = < '*' i:id > - { $$ = PN_AST(MSG, PN_STRCAT("*", PN_STR_PTR(i))) } PN_AST 366 syn/syntax-p5.y PN_AST(LIST, PN_TUP(i))) } PN_AST 369 syn/syntax-p5.y PN_AST(LIST, PN_TUP(k))) } PN_AST 61 syn/syntax.y potion = -- s:statements end-of-file { $$ = P->source = PN_AST(CODE, s) } PN_AST 133 syn/syntax.y expr = ( not a:expr { a = PN_AST(NOT, a) } PN_AST 134 syn/syntax.y | wavy a:expr { a = PN_AST(WAVY, a) } PN_AST 135 syn/syntax.y | minus !minus a:atom { a = PN_OP(AST_MINUS, PN_AST(VALUE, PN_ZERO), a) } PN_AST 136 syn/syntax.y | plus !plus a:atom { a = PN_OP(AST_PLUS, PN_AST(VALUE, PN_ZERO), a) } PN_AST 142 syn/syntax.y { $$ = PN_AST(EXPR, a) } PN_AST 147 syn/syntax.y (v:value | v:list) { n = PN_AST(MSG, PN_NIL); b = PN_NIL; } b:block?) PN_AST 150 syn/syntax.y name = p:path { $$ = PN_AST(PATH, p) } PN_AST 151 syn/syntax.y | quiz ( m:msg { $$ = PN_AST(QUERY, m) } PN_AST 152 syn/syntax.y | p:path { $$ = PN_AST(PATHQ, p) }) PN_AST 154 syn/syntax.y m:msg { $$ = PN_AST(MSG, m) } PN_AST 165 syn/syntax.y | m:msg { $$ = PN_AST(LICK, m) } PN_AST 168 syn/syntax.y | v:unquoted { $$ = PN_AST(VALUE, v) } PN_AST 171 syn/syntax.y list = list-start s:statements list-end { $$ = PN_AST(LIST, s) } PN_AST 172 syn/syntax.y block = block-start s:statements block-end { $$ = PN_AST(BLOCK, s) } PN_AST 173 syn/syntax.y lick = lick-start i:lick-items lick-end { $$ = PN_AST(LIST, i) } PN_AST 174 syn/syntax.y group = group-start s:statements group-end { $$ = PN_AST(EXPR, s) } PN_AST 181 syn/syntax.y value = i:immed - { $$ = PN_AST(VALUE, i) }