aa
|
an implementation of language AA More...
Public Attributes | |
final GVNGCM | _gvn |
Package Functions | |
Parse (String src, Env env, String str) | |
UnOrFunPtrNode | bal_open () |
Node | bfact (int oldx, UnOrFunPtrNode bfun) |
A balanced operator as a fact(). More... | |
Node | do_exit (ScopeNode s, Node rez) |
String | dump () |
String | dumprpo () |
TypeEnv | go () |
Static Package Functions | |
static boolean | isOp (String s) |
Private Member Functions | |
Node | _expr (int prec) |
Node | _expr_higher (int prec, Node lhs) |
Node | _expr_higher_require (int prec, String bintok, Node lhs) |
boolean | _good_prec_tok (int prec, String bintok) |
Node | _short_circuit_expr (Node lhs, int prec, String bintok, Node op, int opx, int lhsx, int rhsx) |
Node | apply () |
Parse a lisp-like function application. More... | |
Node | expr () |
Parse an expression, a series of terms separated by binary operators. More... | |
Node | fact () |
Parse a factor, a leaf grammar token fact = num // number fact = "string" // string fact = (stmts) // General statements parsed recursively fact = (tuple,*) // tuple; first comma required, trailing comma not required fact = balop+ stmts balop- // Constructor with initial size Ex: [ 7 ] // Array constructor fact = balop+ stmts[, stmts]* balop- // Constructor with initial elements Ex: [ 1 , 2 ] // Array constructor with initial elements fact = {binop} // Special syntactic form of binop; no spaces allowed; returns function constant fact = {uniop} // Special syntactic form of uniop; no spaces allowed; returns function constant fact = {func} // Anonymous function declaration fact = id // variable lookup, NOT a binop or uniop but might be e.g. More... | |
int | field_number () |
Node | func () |
TypeEnv | gather_errors () |
Node | ifex () |
Parse an if-expression, with lazy eval on the branches. More... | |
Node | inc (String tok, int d) |
Node | merge_exits (Node rez) |
Type | number () |
void | prog () |
Parse a top-level: prog = stmts END. More... | |
void | remove_unknown_callers () |
Node | stmt (boolean lookup_current_scope_only) |
A statement is a list of variables to final-assign or re-assign, and an ifex for the value. More... | |
Node | stmts () |
Parse a list of statements; final semi-colon is optional. More... | |
Node | stmts (boolean lookup_current_scope_only) |
Node | string () |
Parse a String; _x is at '"'. More... | |
Node | struct () |
Parse anonymous struct; the opening "@{" already parsed. More... | |
Node | term () |
Any number field-lookups or function applications, then an optional assignment term = id++ | id– term = uniop term term = tfact [tuple | .field | [.field[:]=stmt | .field++ | .field– | e] term = tfact bopen stmts bclose // if bopen/bclose is arity-2 e.g. More... | |
Node | tfact () |
Parse an optionally typed factor tfact = fact[:type]. More... | |
String | token () |
String | token0 () |
Node | tstmt () |
A type-statement assigns a type to a type variable. More... | |
Node | tuple (int oldx, Node s, int first_arg_start) |
Parse a tuple; first stmt but not the ',' parsed. More... | |
Node | typechk (Node x, Type t, Node mem, Parse bad) |
Private Attributes | |
final byte[] | _buf |
Env | _e |
int | _lastNWS |
final AryInt | _lines |
final NumberFormat | _nf |
final ParsePosition | _pp |
final String | _src |
final String | _str |
int | _x |
Static Private Attributes | |
static final Access | args_are_mutable =Access.Final |
Parse an anonymous function; the opening '{' already parsed. More... | |
private< N extends Node > N | init (N n) |
private< N extends Node > N | set_ctrl (N n) |
Parse | errMsg () |
Parse | errMsg (int x) |
Parse[] | errMsgs (int... xs) |
Type | type () |
Parse a type or return null type = tcon | tfun | tary | tstruct | ttuple | tvar // Type choices tcon = int, int[1,8,16,32,64], flt, flt[32,64], real, str[?] tary = '[' type? ']' // Cannot specify type for array size tfun = {[[type]* ->]? type } // Function types mirror func decls tmod = = | := | == // '=' is r/final, ':=' is r/w, '==' is read-only tstruct = [id [tmod [type?]];]*} // Struct types are field names with optional types. More... | |
Type | typev () |
Type | typep (boolean type_var) |
Type | typeq (Type t) |
Access | tmod () |
Type | type0 (boolean type_var) |
void | require (char c, int oldx) |
void | require (String s, int oldx) |
boolean | peek (char c) |
boolean | peek_noWS (char c) |
boolean | peek1 (byte c0, char c) |
boolean | peek2 (byte c0, String s2) |
boolean | peek (String s) |
boolean | peek_not (char c, char no) |
String | peek (String[] toks) |
boolean | peek1 (String tok) |
byte | skipWS () |
Advance parse pointer to the first non-whitespace character, and return that character, -1 otherwise. More... | |
void | skipEOL () |
void | skipBlock () |
void | skipNonWS () |
void | kill (Node n) |
Node | mem () |
void | set_mem (Node n) |
ConNode | con (Type t) |
ScopeNode | lookup_scope (String tok, boolean lookup_current_scope_only) |
void | create (String tok, Node n, Access mutable) |
Node | get_display_ptr (ScopeNode scope) |
Node[] | args (Node a0, Node a1) |
Node[] | args (Node a0, Node a1, Node a2) |
Node[] | args (Node a0, Node a1, Node a2, Node a3) |
Node[] | _args (Node[] args) |
Node | do_call (Parse[] bads, Node... args) |
Node | do_call0 (boolean unpack, Parse[] bads, Node... args) |
ErrNode | err_ctrl1 (Node.ErrMsg msg) |
ErrNode | err_ctrl2 (String msg) |
void | err_ctrl0 (String s) |
void | err_ctrl3 (String s, Parse open) |
Parse (Parse P) | |
static boolean | isWS (byte c) |
Return true if c passes a test. More... | |
static boolean | isAlpha0 (byte c) |
static boolean | isAlpha1 (byte c) |
static boolean | isOp0 (byte c) |
static boolean | isOp1 (byte c) |
static boolean | isDigit (byte c) |
Node | gvn (Node n) |
Node | ctrl () |
Node | lookup (String tok) |
ScopeNode | scope () |
String | errLocMsg (String s) |
String | toString () |
boolean | equals (Object loc) |
int | hashCode () |
int | compareTo (Parse loc) |
an implementation of language AA
GRAMMAR: prog = stmts END stmts= [tstmt|stmt][; stmts]*[;]? // multiple statements; final ';' is optional tstmt= tvar = :type // type variable assignment stmt = [id[:type] [:]=]* ifex // ids are (re-)assigned, and are available in later statements stmt = ^ifex // Early function exit ifex = apply [? stmt [: stmt]] // trinary short-circuit logic; missing ":stmt" will default to 0 apply= expr | expr expr* // Lisp-like application-as-adjacent expr = term [binop term]* // gather all the binops and sort by precedence term = uniop term // Any number of prefix uniops term = id++ | id– // then postfix update ops term = tfact bopen stmts bclose // if bopen/bclose is arity-2 e.g. ary[idx] term = tfact bopen stmts bclose stmt // if bopen/bclose is arity-3 e.g. ary[idx]=val term = tfact post // A term is a tfact and some more stuff... post = empty // A term can be just a plain 'tfact' post = (tuple) post // Application argument list post = .field post // Field and tuple lookup post = .field [:]= stmt // Field (re)assignment. Plain '=' is a final assignment post = .field++ | .field– // Allowed anytime a := is allowed post = :type post // TODO: Add this, remove 'tfact' tfact= fact[:type] // Typed fact fact = id // variable lookup fact = num // number fact = "string" // string fact = [stmts] // array decl with size fact = [stmts,[stmts,]*] // array decl with tuple fact = (stmts) // General statements parsed recursively fact = (tuple) // Tuple builder fact = func // Anonymous function declaration fact = stmts } // Anonymous struct declaration, assignments define fields fact = {binop} // Special syntactic form of binop; no spaces allowed; returns function constant fact = {uniop} // Special syntactic form of uniop; no spaces allowed; returns function constant tuple= (stmts,[stmts,]) // Tuple; final comma is optional, first comma is required binop= +-*%&|/<>!= [ ]= // etc; primitive lookup; can determine infix binop at parse-time uniop= -!~# a // etc; primitive lookup; can determine infix uniop at parse-time func = { [id[:type]* ->]? stmts} // Anonymous function declaration, if no args then the -> is optional // Pattern matching: 1 arg is the arg; 2+ args break down a (required) tuple str = [.%]* // String contents; \t
\r% standard escapes str = %[num]?[.num]?fact // Percent escape embeds a 'fact' in a string; "name=%name\n" type = tcon | tvar | tfun[?] | tstruct[?] | ttuple[?] // Types are a tcon or a tfun or a tstruct or a type variable. A trailing ? means 'nilable' tcon = int, int[1,8,16,32,64], flt, flt[32,64], real, str[?] tfun = {[[type]* ->]? type } // Function types mirror func declarations ttuple = ( [[type],]* ) // Tuple types are just a list of optional types; the count of commas dictates the length, zero commas is zero length. Tuples are always final. tmod = := | = | == // ':=' or '' is r/w, '=' is final, '==' is r/o tstruct = [id [tmod [type?]],]*} // Struct types are field names with optional types. Spaces not allowed tvar = id // Type variable lookup
Definition at line 68 of file Parse.java.
|
package |
Definition at line 82 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._e, com.cliffc.aa.Parse._gvn, com.cliffc.aa.Parse._lines, com.cliffc.aa.Parse._nf, com.cliffc.aa.Parse._pp, com.cliffc.aa.Parse._src, com.cliffc.aa.Parse._str, com.cliffc.aa.Parse._x, com.cliffc.aa.Env.GVN, and com.cliffc.aa.util.AryInt.push().
Referenced by com.cliffc.aa.Parse.equals(), and com.cliffc.aa.Parse.errMsg().
|
private |
Definition at line 1445 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._e, com.cliffc.aa.Parse._gvn, com.cliffc.aa.Parse._lastNWS, com.cliffc.aa.Parse._lines, com.cliffc.aa.Parse._nf, com.cliffc.aa.Parse._pp, com.cliffc.aa.Parse._src, com.cliffc.aa.Parse._str, and com.cliffc.aa.Parse._x.
Definition at line 1398 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.Env._nongen, com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.Parse.args(), com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Env.GVN, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.Parse.mem(), and com.cliffc.aa.node.Node.unkeep().
Referenced by com.cliffc.aa.Parse.args().
|
private |
Definition at line 465 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.Parse._expr_higher(), com.cliffc.aa.Parse._expr_higher_require(), com.cliffc.aa.Parse._good_prec_tok(), com.cliffc.aa.node.FunNode._op_prec, com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.node.FunNode._thunk_rhs, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.args(), com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Parse.do_call(), com.cliffc.aa.Parse.errMsgs(), com.cliffc.aa.node.FunPtrNode.fun(), com.cliffc.aa.node.UnOrFunPtrNode.funptr(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.Env.lookup_filter_fresh(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.node.PrimNode.PRIM_TOKS, com.cliffc.aa.Parse.skipWS(), and com.cliffc.aa.node.Node.unkeep().
Referenced by com.cliffc.aa.Parse._expr_higher(), and com.cliffc.aa.Parse.expr().
Definition at line 499 of file Parse.java.
References com.cliffc.aa.Parse._expr(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.node.PrimNode.PREC_TOKS, com.cliffc.aa.Parse.term(), and com.cliffc.aa.node.Node.unkeep().
Referenced by com.cliffc.aa.Parse._expr(), and com.cliffc.aa.Parse._expr_higher_require().
Definition at line 505 of file Parse.java.
References com.cliffc.aa.Parse._expr_higher(), and com.cliffc.aa.Parse.err_ctrl2().
Referenced by com.cliffc.aa.Parse._expr(), and com.cliffc.aa.Parse._short_circuit_expr().
|
private |
Definition at line 510 of file Parse.java.
References com.cliffc.aa.util.Util.eq(), and com.cliffc.aa.node.PrimNode.PREC_TOKS.
Referenced by com.cliffc.aa.Parse._expr().
|
private |
Definition at line 521 of file Parse.java.
References com.cliffc.aa.Parse._expr_higher_require(), com.cliffc.aa.util.Ary< E >._len, com.cliffc.aa.node.NewNode< T extends TypeObj< T >._ts, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.Parse.args(), com.cliffc.aa.util.Ary< E >.at(), com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.Parse.do_call(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.Parse.errMsgs(), com.cliffc.aa.type.TypeFld.Access.Final, com.cliffc.aa.Env.GVN, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.type.TypeMem.MEM, com.cliffc.aa.Parse.mem(), com.cliffc.aa.Parse.scope(), com.cliffc.aa.Parse.set_ctrl(), com.cliffc.aa.Parse.set_mem(), com.cliffc.aa.node.ScopeNode.stk(), and com.cliffc.aa.node.Node.unkeep().
Referenced by com.cliffc.aa.Parse._expr().
|
private |
Parse a lisp-like function application.
To avoid the common bug of forgetting a ';', these must be on the same line. apply = expr apply = expr expr*
Definition at line 427 of file Parse.java.
References com.cliffc.aa.Parse._lastNWS, com.cliffc.aa.Parse._lines, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.args(), com.cliffc.aa.util.AryInt.binary_search(), com.cliffc.aa.Parse.do_call(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.errMsgs(), com.cliffc.aa.Parse.expr(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.node.Node.unhook(), and com.cliffc.aa.node.Node.unkeep().
Referenced by com.cliffc.aa.Parse.ifex().
Definition at line 1395 of file Parse.java.
References com.cliffc.aa.Parse._args().
Referenced by com.cliffc.aa.Parse._args(), com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Parse.apply(), com.cliffc.aa.Parse.bfact(), com.cliffc.aa.Parse.do_call(), com.cliffc.aa.Parse.do_call0(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.term(), and com.cliffc.aa.Parse.tuple().
Definition at line 1396 of file Parse.java.
References com.cliffc.aa.Parse._args().
Definition at line 1397 of file Parse.java.
References com.cliffc.aa.Parse._args().
|
package |
Definition at line 1054 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.node.FunPtrNode._name, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.node.UnOrFunPtrNode.funptr(), com.cliffc.aa.Env.lookup_filter_fresh(), com.cliffc.aa.node.Node.op_prec(), and com.cliffc.aa.Parse.token().
Referenced by com.cliffc.aa.Parse.term().
|
package |
A balanced operator as a fact().
Any balancing token can be used. bterm = [ stmts ] // size constructor bterm = [ stmts, [stmts,]* ] // tuple constructor
Definition at line 1040 of file Parse.java.
References com.cliffc.aa.node.FunNode._bal_close, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.args(), com.cliffc.aa.Parse.do_call(), com.cliffc.aa.Parse.errMsgs(), com.cliffc.aa.node.FunPtrNode.fun(), com.cliffc.aa.node.UnOrFunPtrNode.funptr(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.require(), com.cliffc.aa.Parse.skipWS(), and com.cliffc.aa.Parse.stmts().
Referenced by com.cliffc.aa.Parse.fact().
int com.cliffc.aa.Parse.compareTo | ( | Parse | loc | ) |
Definition at line 1500 of file Parse.java.
References com.cliffc.aa.Parse._src, and com.cliffc.aa.Parse._x.
Definition at line 1369 of file Parse.java.
References com.cliffc.aa.node.Node.con().
Referenced by com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.inc(), and com.cliffc.aa.Parse.prog().
Definition at line 1375 of file Parse.java.
References com.cliffc.aa.node.NewObjNode.create(), com.cliffc.aa.Parse.scope(), and com.cliffc.aa.node.ScopeNode.stk().
Referenced by com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.inc(), and com.cliffc.aa.Parse.stmt().
Node com.cliffc.aa.Parse.ctrl | ( | ) |
Definition at line 1363 of file Parse.java.
References com.cliffc.aa.node.ScopeNode.ctrl(), and com.cliffc.aa.Parse.scope().
Referenced by com.cliffc.aa.Parse._args(), com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Parse.bal_open(), com.cliffc.aa.Parse.do_call0(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.err_ctrl3(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.Parse.struct(), and com.cliffc.aa.Parse.term().
Definition at line 1414 of file Parse.java.
References com.cliffc.aa.Parse.args(), and com.cliffc.aa.Parse.do_call0().
Referenced by com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Parse.apply(), com.cliffc.aa.Parse.bfact(), com.cliffc.aa.Parse.inc(), and com.cliffc.aa.Parse.term().
Definition at line 1415 of file Parse.java.
References com.cliffc.aa.node.CallEpiNode._is_copy, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_inline(), com.cliffc.aa.GVNGCM.add_work_all(), com.cliffc.aa.Parse.args(), com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.node.RetNode.fun(), com.cliffc.aa.Env.GVN, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.node.Node.is_copy(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.node.CallEpiNode.nwired(), com.cliffc.aa.Parse.set_ctrl(), com.cliffc.aa.Parse.set_mem(), com.cliffc.aa.node.Node.unkeep(), and com.cliffc.aa.node.CallEpiNode.wired().
Referenced by com.cliffc.aa.Parse.do_call(), and com.cliffc.aa.Parse.term().
Definition at line 1019 of file Parse.java.
References com.cliffc.aa.node.Node._val, com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.Parse.con(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.node.ScopeNode.early_ctrl(), com.cliffc.aa.node.ScopeNode.early_mem(), com.cliffc.aa.node.ScopeNode.early_val(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.type.TypeMem.MEM, com.cliffc.aa.Parse.mem(), com.cliffc.aa.type.Type< T extends Type< T >.SCALAR, com.cliffc.aa.Parse.set_ctrl(), com.cliffc.aa.node.Node.set_def(), com.cliffc.aa.Parse.set_mem(), com.cliffc.aa.Env.XCTRL, com.cliffc.aa.type.TypeMem.XMEM, and com.cliffc.aa.Env.XNIL.
Referenced by com.cliffc.aa.Env.early_exit().
|
package |
Definition at line 97 of file Parse.java.
References com.cliffc.aa.node.Node.dump(), and com.cliffc.aa.Parse.scope().
|
package |
Definition at line 98 of file Parse.java.
References com.cliffc.aa.node.Node.dumprpo(), and com.cliffc.aa.Env.START.
boolean com.cliffc.aa.Parse.equals | ( | Object | loc | ) |
Definition at line 1491 of file Parse.java.
References com.cliffc.aa.Parse._src, com.cliffc.aa.Parse._x, and com.cliffc.aa.Parse.Parse().
Referenced by com.cliffc.aa.node.Node.ErrMsg.equals().
|
private |
Definition at line 1439 of file Parse.java.
References com.cliffc.aa.Parse.err_ctrl3(), and com.cliffc.aa.Parse.errMsg().
Referenced by com.cliffc.aa.Parse.func(), and com.cliffc.aa.Parse.stmt().
|
private |
Definition at line 1437 of file Parse.java.
References com.cliffc.aa.Parse.init(), and com.cliffc.aa.Env.START.
Referenced by com.cliffc.aa.Parse.inc(), and com.cliffc.aa.Parse.stmt().
|
private |
Definition at line 1438 of file Parse.java.
References com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Parse.errMsg(), and com.cliffc.aa.Parse.init().
Referenced by com.cliffc.aa.Parse._expr_higher_require(), com.cliffc.aa.Parse.apply(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.term(), and com.cliffc.aa.Parse.tstmt().
|
private |
Definition at line 1440 of file Parse.java.
References com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Parse.gvn(), and com.cliffc.aa.Parse.set_ctrl().
Referenced by com.cliffc.aa.Parse.err_ctrl0(), and com.cliffc.aa.Parse.require().
String com.cliffc.aa.Parse.errLocMsg | ( | String | s | ) |
Definition at line 1466 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.util.AryInt._len, com.cliffc.aa.Parse._lines, com.cliffc.aa.Parse._src, com.cliffc.aa.Parse._x, com.cliffc.aa.util.AryInt.at(), com.cliffc.aa.util.AryInt.binary_search(), com.cliffc.aa.util.SB.nl(), com.cliffc.aa.util.SB.p(), and com.cliffc.aa.util.SB.toString().
Referenced by com.cliffc.aa.node.Node.ErrMsg.toString().
|
package |
Definition at line 1455 of file Parse.java.
References com.cliffc.aa.Parse._x, and com.cliffc.aa.Parse.errMsg().
Referenced by com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Env.Env(), com.cliffc.aa.Parse.err_ctrl0(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.Parse.errMsgs(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.require(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.struct(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.tfact(), com.cliffc.aa.Parse.tstmt(), and com.cliffc.aa.Parse.tuple().
|
package |
Definition at line 1456 of file Parse.java.
References com.cliffc.aa.Parse._x, and com.cliffc.aa.Parse.Parse().
|
package |
Definition at line 1457 of file Parse.java.
References com.cliffc.aa.Parse.errMsg().
Referenced by com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Parse.apply(), com.cliffc.aa.Parse.bfact(), com.cliffc.aa.Parse.inc(), and com.cliffc.aa.Parse.term().
|
private |
Parse an expression, a series of terms separated by binary operators.
Precedence is encoded in the PrimNode.PRECEDENCE table, and reflects here by the expr# recursive calls. expr = term [binop term]* Calls out for the precedence, starting high and working down low. expr = expr9 [binop9 expr9] expr9 = expr8 [binop8 expr8] ... expr2 = expr1 [binop2 expr1] expr1 = term [binop1 term ]
Definition at line 459 of file Parse.java.
References com.cliffc.aa.Parse._expr(), and com.cliffc.aa.Parse.skipWS().
Referenced by com.cliffc.aa.Parse.apply(), and com.cliffc.aa.Parse.ifex().
|
private |
Parse a factor, a leaf grammar token fact = num // number fact = "string" // string fact = (stmts) // General statements parsed recursively fact = (tuple,*) // tuple; first comma required, trailing comma not required fact = balop+ stmts balop- // Constructor with initial size Ex: [ 7 ] // Array constructor fact = balop+ stmts[, stmts]* balop- // Constructor with initial elements Ex: [ 1 , 2 ] // Array constructor with initial elements fact = {binop} // Special syntactic form of binop; no spaces allowed; returns function constant fact = {uniop} // Special syntactic form of uniop; no spaces allowed; returns function constant fact = {func} // Anonymous function declaration fact = id // variable lookup, NOT a binop or uniop but might be e.g.
function-valued, including un-/binops as values
Definition at line 772 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._e, com.cliffc.aa.Parse._gvn, com.cliffc.aa.Env._nongen, com.cliffc.aa.Env._scope, com.cliffc.aa.node.Node._val, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.bfact(), com.cliffc.aa.Parse.con(), com.cliffc.aa.node.NewObjNode.create(), com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.util.Util.eq(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.type.TypeFld.Access.Final, com.cliffc.aa.node.FunPtrNode.forward_ref(), com.cliffc.aa.Parse.func(), com.cliffc.aa.node.ScopeNode.get(), com.cliffc.aa.Parse.get_display_ptr(), com.cliffc.aa.Parse.gvn(), com.cliffc.aa.Parse.isDigit(), com.cliffc.aa.Parse.isOp(), com.cliffc.aa.Env.lookup(), com.cliffc.aa.Env.lookup_fref(), com.cliffc.aa.Parse.lookup_scope(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.Parse.number(), com.cliffc.aa.node.Node.op_prec(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.peek1(), com.cliffc.aa.Parse.peek2(), com.cliffc.aa.Parse.scope(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.node.ScopeNode.stk(), com.cliffc.aa.Parse.stmts(), com.cliffc.aa.Parse.string(), com.cliffc.aa.Parse.token0(), and com.cliffc.aa.Parse.tuple().
Referenced by com.cliffc.aa.Parse.tfact().
|
private |
Definition at line 1107 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._x, and com.cliffc.aa.Parse.isDigit().
Referenced by com.cliffc.aa.Parse.term().
|
private |
Definition at line 897 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.Parse._gvn, com.cliffc.aa.util.Ary< E >._len, com.cliffc.aa.Env._nongen, com.cliffc.aa.Env._par, com.cliffc.aa.node.Node._val, com.cliffc.aa.Parse._x, com.cliffc.aa.util.Ary< E >.add(), com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.Env.VStack.add_var(), com.cliffc.aa.type.TypeRPC.ALL_CALL, com.cliffc.aa.Env.ALL_CTRL, com.cliffc.aa.Parse.args_are_mutable, com.cliffc.aa.util.Ary< E >.asAry(), com.cliffc.aa.util.Ary< E >.at(), com.cliffc.aa.Env.VStack.compact(), com.cliffc.aa.Parse.con(), com.cliffc.aa.Parse.create(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.util.Util.eq(), com.cliffc.aa.Parse.err_ctrl0(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.type.TypeFld.Access.Final, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.Parse.isAlpha0(), com.cliffc.aa.type.TypeMem.MEM, com.cliffc.aa.Parse.mem(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.node.ScopeNode.ptr(), com.cliffc.aa.util.Ary< E >.push(), com.cliffc.aa.Parse.require(), com.cliffc.aa.type.Type< T extends Type< T >.SCALAR, com.cliffc.aa.Parse.scope(), com.cliffc.aa.util.Ary< E >.set_len(), com.cliffc.aa.node.FunNode.set_nongens(), com.cliffc.aa.Parse.skipNonWS(), com.cliffc.aa.Parse.stmts(), com.cliffc.aa.Parse.token(), com.cliffc.aa.node.Node.tvar(), com.cliffc.aa.Parse.type(), com.cliffc.aa.node.Node.unhook(), and com.cliffc.aa.node.NewObjNode.update().
Referenced by com.cliffc.aa.Parse.fact().
|
private |
Definition at line 140 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.Env._par, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.node.ScopeNode.mem(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.node.ScopeNode.rez(), com.cliffc.aa.Parse.scope(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.node.Node.ErrMsg.trailingjunk(), and com.cliffc.aa.node.Node.walkerr_def().
Referenced by com.cliffc.aa.Parse.go().
Definition at line 1379 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.Env._par, com.cliffc.aa.Env._scope, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.type.Type< T extends Type< T >.is_display_ptr(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.node.ScopeNode.ptr(), com.cliffc.aa.Parse.scope(), and com.cliffc.aa.node.Node.sharptr().
Referenced by com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.inc(), and com.cliffc.aa.Parse.stmt().
|
package |
Definition at line 104 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.Parse._gvn, com.cliffc.aa.Env._scope, com.cliffc.aa.Env.close_display(), com.cliffc.aa.Parse.gather_errors(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.GVNGCM.iter(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.GVNGCM.Mode.Opto, com.cliffc.aa.GVNGCM.Mode.PesiCG, com.cliffc.aa.GVNGCM.Mode.PesiNoCG, com.cliffc.aa.Parse.prog(), com.cliffc.aa.Parse.remove_unknown_callers(), com.cliffc.aa.Parse.scope(), and com.cliffc.aa.node.Node.unkeep().
Definition at line 1358 of file Parse.java.
References com.cliffc.aa.Parse._gvn, and com.cliffc.aa.GVNGCM.xform().
Referenced by com.cliffc.aa.Parse._args(), com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Parse.do_call0(), com.cliffc.aa.Parse.err_ctrl3(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.get_display_ptr(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.string(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.tstmt(), com.cliffc.aa.Parse.tuple(), com.cliffc.aa.Parse.type0(), and com.cliffc.aa.Parse.typechk().
int com.cliffc.aa.Parse.hashCode | ( | ) |
Definition at line 1497 of file Parse.java.
References com.cliffc.aa.Parse._src, and com.cliffc.aa.Parse._x.
Referenced by com.cliffc.aa.node.UnresolvedNode.hashCode(), and com.cliffc.aa.node.Node.ErrMsg.hashCode().
|
private |
Parse an if-expression, with lazy eval on the branches.
Assignments to new variables are allowed in either arm (as-if each arm is in a mini scope), and variables assigned on all live arms are available afterwards. ifex = expr [? stmt [: stmt]]
Definition at line 380 of file Parse.java.
References com.cliffc.aa.Parse._gvn, com.cliffc.aa.node.Node._val, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.GVNGCM.add_work_all(), com.cliffc.aa.Parse.apply(), com.cliffc.aa.node.ScopeNode.check_if(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.Parse.expr(), com.cliffc.aa.node.ScopeNode.flip_if(), com.cliffc.aa.type.TypeMem.FULL, com.cliffc.aa.Env.GVN, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.Parse.init(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.node.ScopeNode.pop_if(), com.cliffc.aa.node.ScopeNode.push_if(), com.cliffc.aa.type.Type< T extends Type< T >.SCALAR, com.cliffc.aa.Parse.scope(), com.cliffc.aa.Parse.set_ctrl(), com.cliffc.aa.Parse.set_mem(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.node.Node.unkeep(), com.cliffc.aa.type.Type< T extends Type< T >.XCTRL, and com.cliffc.aa.Env.XNIL.
Referenced by com.cliffc.aa.Parse.stmt().
|
private |
Definition at line 713 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.Env._nongen, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.args(), com.cliffc.aa.type.TypeInt.con(), com.cliffc.aa.Parse.con(), com.cliffc.aa.Parse.create(), com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Parse.do_call(), com.cliffc.aa.Parse.err_ctrl1(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.Parse.errMsgs(), com.cliffc.aa.node.Node.ErrMsg.forward_ref(), com.cliffc.aa.Parse.get_display_ptr(), com.cliffc.aa.Parse.gvn(), com.cliffc.aa.node.Node.is_forward_ref(), com.cliffc.aa.node.ScopeNode.is_mutable(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.Env.lookup_filter_fresh(), com.cliffc.aa.Parse.lookup_scope(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.node.ScopeNode.replace_mem(), com.cliffc.aa.type.TypeFld.Access.RW, com.cliffc.aa.Parse.scope(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.node.Node.unkeep(), and com.cliffc.aa.Env.XNIL.
Referenced by com.cliffc.aa.Parse.term().
|
package |
Definition at line 1359 of file Parse.java.
References com.cliffc.aa.Parse._gvn, and com.cliffc.aa.GVNGCM.init().
Referenced by com.cliffc.aa.Parse.err_ctrl1(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.ifex(), and com.cliffc.aa.Parse.tuple().
|
staticprivate |
Definition at line 1351 of file Parse.java.
Referenced by com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.isAlpha1(), and com.cliffc.aa.Parse.token0().
|
staticprivate |
Definition at line 1352 of file Parse.java.
References com.cliffc.aa.Parse.isAlpha0().
Referenced by com.cliffc.aa.Parse.token0().
|
static |
Definition at line 1355 of file Parse.java.
Referenced by com.cliffc.aa.Parse.fact(), and com.cliffc.aa.Parse.field_number().
|
staticpackage |
Definition at line 1089 of file Parse.java.
References com.cliffc.aa.Parse.isOp0(), and com.cliffc.aa.Parse.isOp1().
Referenced by com.cliffc.aa.Parse.fact(), and com.cliffc.aa.Env.lookup_filter_fresh().
|
staticprivate |
Definition at line 1353 of file Parse.java.
Referenced by com.cliffc.aa.Parse.isOp(), com.cliffc.aa.Parse.isOp1(), and com.cliffc.aa.Parse.token0().
|
staticprivate |
Definition at line 1354 of file Parse.java.
References com.cliffc.aa.Parse.isOp0().
Referenced by com.cliffc.aa.Parse.isOp(), and com.cliffc.aa.Parse.token0().
|
staticprivate |
Return true if c
passes a test.
Definition at line 1350 of file Parse.java.
Referenced by com.cliffc.aa.Parse.skipNonWS(), and com.cliffc.aa.Parse.skipWS().
|
private |
Definition at line 1360 of file Parse.java.
References com.cliffc.aa.node.Node._uses, and com.cliffc.aa.node.Node.kill().
Referenced by com.cliffc.aa.Parse.stmts(), and com.cliffc.aa.Parse.term().
Node com.cliffc.aa.Parse.lookup | ( | String | tok | ) |
Definition at line 1372 of file Parse.java.
References com.cliffc.aa.Parse._e, and com.cliffc.aa.Env.lookup().
Referenced by com.cliffc.aa.Parse.tstmt(), and com.cliffc.aa.Parse.type0().
|
private |
Definition at line 1373 of file Parse.java.
References com.cliffc.aa.Parse._e, and com.cliffc.aa.Env.lookup_scope().
Referenced by com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.inc(), and com.cliffc.aa.Parse.stmt().
|
private |
Definition at line 1366 of file Parse.java.
References com.cliffc.aa.node.ScopeNode.mem(), and com.cliffc.aa.Parse.scope().
Referenced by com.cliffc.aa.Parse._args(), com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.gather_errors(), com.cliffc.aa.Parse.get_display_ptr(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.string(), com.cliffc.aa.Parse.struct(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.tfact(), com.cliffc.aa.Parse.tuple(), and com.cliffc.aa.Parse.typechk().
Definition at line 996 of file Parse.java.
References com.cliffc.aa.Parse._gvn, com.cliffc.aa.node.Node._val, com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.node.ScopeNode.early_ctrl(), com.cliffc.aa.node.ScopeNode.early_kill(), com.cliffc.aa.node.ScopeNode.early_mem(), com.cliffc.aa.node.ScopeNode.early_val(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.Parse.scope(), com.cliffc.aa.Parse.set_ctrl(), com.cliffc.aa.Parse.set_mem(), and com.cliffc.aa.node.Node.unkeep().
Referenced by com.cliffc.aa.Parse.func().
|
private |
Definition at line 1098 of file Parse.java.
References com.cliffc.aa.Parse._nf, com.cliffc.aa.Parse._pp, com.cliffc.aa.Parse._str, com.cliffc.aa.Parse._x, com.cliffc.aa.type.TypeFlt.con(), com.cliffc.aa.type.TypeInt.con(), and com.cliffc.aa.type.Type< T extends Type< T >.XNIL.
Referenced by com.cliffc.aa.Parse.fact().
|
private |
Definition at line 1282 of file Parse.java.
References com.cliffc.aa.Parse.peek1(), and com.cliffc.aa.Parse.skipWS().
Referenced by com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse.bfact(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.require(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.stmts(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.tfact(), com.cliffc.aa.Parse.tmod(), com.cliffc.aa.Parse.tstmt(), com.cliffc.aa.Parse.tuple(), and com.cliffc.aa.Parse.type0().
|
private |
Definition at line 1300 of file Parse.java.
References com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.peek(), and com.cliffc.aa.Parse.peek_noWS().
|
private |
Definition at line 1313 of file Parse.java.
References com.cliffc.aa.Parse.peek1().
|
private |
Definition at line 1286 of file Parse.java.
References com.cliffc.aa.Parse._buf, and com.cliffc.aa.Parse._x.
Referenced by com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.peek(), and com.cliffc.aa.Parse.peek_noWS().
|
private |
Definition at line 1317 of file Parse.java.
References com.cliffc.aa.Parse._buf, and com.cliffc.aa.Parse._x.
|
private |
Definition at line 1294 of file Parse.java.
References com.cliffc.aa.Parse._buf, and com.cliffc.aa.Parse._x.
Referenced by com.cliffc.aa.Parse.fact().
|
private |
Definition at line 1306 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._x, and com.cliffc.aa.Parse.skipWS().
Referenced by com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.term(), and com.cliffc.aa.Parse.tmod().
|
private |
Definition at line 1283 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._x, and com.cliffc.aa.Parse.peek1().
Referenced by com.cliffc.aa.Parse.peek(), and com.cliffc.aa.Parse.typeq().
|
private |
Parse a top-level: prog = stmts END.
Definition at line 157 of file Parse.java.
References com.cliffc.aa.Parse._gvn, com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.type.Type< T extends Type< T >.ANY, com.cliffc.aa.Parse.con(), com.cliffc.aa.GVNGCM.Mode.Parse, com.cliffc.aa.Parse.scope(), com.cliffc.aa.node.ScopeNode.set_rez(), and com.cliffc.aa.Parse.stmts().
Referenced by com.cliffc.aa.Parse.go().
|
private |
Definition at line 120 of file Parse.java.
References com.cliffc.aa.util.Ary< E >._len, com.cliffc.aa.node.Node._uses, com.cliffc.aa.Env.ALL_CTRL, com.cliffc.aa.Env.ANY, com.cliffc.aa.util.Ary< E >.at(), com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.insert(), com.cliffc.aa.node.Node.is_prim(), com.cliffc.aa.node.Node.set_def(), com.cliffc.aa.node.Node.unkeep(), and com.cliffc.aa.Env.XCTRL.
Referenced by com.cliffc.aa.Parse.go().
|
private |
Definition at line 1270 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.err_ctrl3(), com.cliffc.aa.Parse.errMsg(), and com.cliffc.aa.Parse.peek().
Referenced by com.cliffc.aa.Parse.bfact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.require(), com.cliffc.aa.Parse.struct(), com.cliffc.aa.Parse.term(), and com.cliffc.aa.Parse.tuple().
|
private |
Definition at line 1276 of file Parse.java.
References com.cliffc.aa.Parse.require().
ScopeNode com.cliffc.aa.Parse.scope | ( | ) |
Definition at line 1374 of file Parse.java.
References com.cliffc.aa.Parse._e, and com.cliffc.aa.Env._scope.
Referenced by com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Parse.create(), com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Parse.dump(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.gather_errors(), com.cliffc.aa.Parse.get_display_ptr(), com.cliffc.aa.Parse.go(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.Parse.prog(), com.cliffc.aa.Parse.set_ctrl(), com.cliffc.aa.Parse.set_mem(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.tstmt(), and com.cliffc.aa.Parse.type0().
|
package |
Definition at line 1365 of file Parse.java.
References com.cliffc.aa.Parse.scope(), and com.cliffc.aa.node.ScopeNode.set_ctrl().
Referenced by com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Parse.do_call0(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.Parse.err_ctrl3(), com.cliffc.aa.Parse.ifex(), and com.cliffc.aa.Parse.merge_exits().
|
private |
Definition at line 1367 of file Parse.java.
References com.cliffc.aa.Parse.scope(), and com.cliffc.aa.node.ScopeNode.set_mem().
Referenced by com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.Parse.do_call0(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.Parse.string(), and com.cliffc.aa.Parse.tuple().
|
private |
Definition at line 1343 of file Parse.java.
Referenced by com.cliffc.aa.Parse.skipWS().
|
private |
Definition at line 1342 of file Parse.java.
References com.cliffc.aa.Parse._buf, and com.cliffc.aa.Parse._x.
Referenced by com.cliffc.aa.Parse.skipWS().
|
private |
Definition at line 1345 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._x, and com.cliffc.aa.Parse.isWS().
Referenced by com.cliffc.aa.Parse.func().
|
private |
Advance parse pointer to the first non-whitespace character, and return that character, -1 otherwise.
Definition at line 1327 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._lastNWS, com.cliffc.aa.Parse._lines, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.isWS(), com.cliffc.aa.util.AryInt.last(), com.cliffc.aa.util.AryInt.push(), com.cliffc.aa.Parse.skipBlock(), and com.cliffc.aa.Parse.skipEOL().
Referenced by com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse.apply(), com.cliffc.aa.Parse.bfact(), com.cliffc.aa.Parse.expr(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.gather_errors(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.peek_not(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.token(), com.cliffc.aa.Parse.tuple(), and com.cliffc.aa.Parse.type0().
|
private |
A statement is a list of variables to final-assign or re-assign, and an ifex for the value.
The variables are available in all later statements. Final-assigned variables can never be assigned again. Forward references must be defined in the same scope (or higher) as the outermost pending def. This is the same as a lambda calc LetRec expression: "let id = def in ..."
stmt = [id[:type] [:]=]* ifex stmt = id // Implicit variable creation with nil stmt = ^ifex // Early function exit
Note the syntax difference between: stmt = id := val // re-assignment stmt = id = val // final assignment tstmt = id =:type // type variable decl, type assignment
The ':=' is the re-assignment token, no spaces allowed.
Definition at line 268 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.util.Ary< E >._len, com.cliffc.aa.Env._nongen, com.cliffc.aa.Env._par, com.cliffc.aa.Parse._x, com.cliffc.aa.util.Ary< E >.add(), com.cliffc.aa.Env.VStack.add_var(), com.cliffc.aa.util.Ary< E >.at(), com.cliffc.aa.Parse.create(), com.cliffc.aa.node.ScopeNode.def_if(), com.cliffc.aa.Env.early_exit(), com.cliffc.aa.Parse.err_ctrl0(), com.cliffc.aa.Parse.err_ctrl1(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.type.TypeFld.Access.Final, com.cliffc.aa.node.NewObjNode.get(), com.cliffc.aa.Parse.get_display_ptr(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.node.Node.is_forward_ref(), com.cliffc.aa.node.NewObjNode.is_mutable(), com.cliffc.aa.util.Ary< E >.isEmpty(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.util.Ary< E >.last(), com.cliffc.aa.Parse.lookup_scope(), com.cliffc.aa.tvar.TV2.make_leaf_ns(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.Env.nongen_pop(), com.cliffc.aa.Env.nongen_push(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.peek_not(), com.cliffc.aa.node.ScopeNode.replace_mem(), com.cliffc.aa.type.TypeFld.Access.RW, com.cliffc.aa.Parse.scope(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.node.ScopeNode.stk(), com.cliffc.aa.node.Node.ErrMsg.syntax(), com.cliffc.aa.Parse.token(), com.cliffc.aa.Parse.type(), com.cliffc.aa.Parse.typechk(), com.cliffc.aa.node.Node.unkeep(), and com.cliffc.aa.Env.XNIL.
Referenced by com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.stmts(), and com.cliffc.aa.Parse.term().
|
private |
Parse a list of statements; final semi-colon is optional.
stmts= [tstmt or stmt] [; stmts]*[;]?
Definition at line 167 of file Parse.java.
References com.cliffc.aa.Parse.stmts().
Referenced by com.cliffc.aa.Parse.bfact(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.prog(), com.cliffc.aa.Parse.stmts(), com.cliffc.aa.Parse.struct(), com.cliffc.aa.Parse.term(), and com.cliffc.aa.Parse.tuple().
|
private |
Definition at line 168 of file Parse.java.
References com.cliffc.aa.Parse._x, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.keep(), com.cliffc.aa.Parse.kill(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.stmt(), and com.cliffc.aa.Parse.tstmt().
|
private |
Parse a String; _x is at '"'.
str = [.%]* // String contents; \t
\r% standard escapes str = %[num]?[.num]?fact // Percent escape embeds a 'fact' in a string; "name=%name\n"
Definition at line 1123 of file Parse.java.
References com.cliffc.aa.node.NewNode< T extends TypeObj< T >._alias, com.cliffc.aa.Parse._buf, com.cliffc.aa.node.Node._defs, com.cliffc.aa.Parse._x, com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.node.DefMemNode.make_mem_proj(), com.cliffc.aa.Parse.mem(), and com.cliffc.aa.Parse.set_mem().
Referenced by com.cliffc.aa.Parse.fact().
|
private |
Parse anonymous struct; the opening "@{" already parsed.
A lexical scope is made and new variables are defined here. Next comes statements, with each assigned value becoming a struct member, then the closing "}". struct = @{ stmts }
Definition at line 876 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.Env._par, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.Parse.require(), com.cliffc.aa.Parse.stmts(), and com.cliffc.aa.node.Node.unkeep().
|
private |
Any number field-lookups or function applications, then an optional assignment term = id++ | id– term = uniop term term = tfact [tuple | .field | [.field[:]=stmt | .field++ | .field– | e] term = tfact bopen stmts bclose // if bopen/bclose is arity-2 e.g.
ary[idx] term = tfact bopen stmts bclose stmt // if bopen/bclose is arity-3 e.g. ary[idx]=val
Definition at line 575 of file Parse.java.
References com.cliffc.aa.node.FunNode._bal_close, com.cliffc.aa.Parse._buf, com.cliffc.aa.node.Node._defs, com.cliffc.aa.Parse._e, com.cliffc.aa.node.FunPtrNode._name, com.cliffc.aa.Env._nongen, com.cliffc.aa.node.FunNode._op_prec, com.cliffc.aa.node.Node._val, com.cliffc.aa.Parse._x, com.cliffc.aa.GVNGCM.add_dead(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.Parse.args(), com.cliffc.aa.Parse.bal_open(), com.cliffc.aa.Parse.ctrl(), com.cliffc.aa.Parse.do_call(), com.cliffc.aa.Parse.do_call0(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.Parse.errMsgs(), com.cliffc.aa.Parse.field_number(), com.cliffc.aa.type.TypeFld.Access.Final, com.cliffc.aa.node.FunNode.fptr(), com.cliffc.aa.node.FunPtrNode.fun(), com.cliffc.aa.node.UnOrFunPtrNode.funptr(), com.cliffc.aa.type.TypeFunPtr.GENERIC_FUNPTR, com.cliffc.aa.Env.GVN, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.type.TypeMemPtr.ISUSED, com.cliffc.aa.node.Node.keep(), com.cliffc.aa.Parse.kill(), com.cliffc.aa.Env.lookup_filter_fresh(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.node.FunNode.nargs(), com.cliffc.aa.node.Node.op_prec(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.peek_not(), com.cliffc.aa.node.ScopeNode.replace_mem(), com.cliffc.aa.Parse.require(), com.cliffc.aa.type.TypeFld.Access.RW, com.cliffc.aa.Parse.scope(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.stmts(), com.cliffc.aa.Parse.tfact(), com.cliffc.aa.Parse.token(), com.cliffc.aa.Parse.token0(), com.cliffc.aa.Parse.tuple(), com.cliffc.aa.node.Node.unhook(), and com.cliffc.aa.node.Node.unkeep().
Referenced by com.cliffc.aa.Parse._expr_higher().
|
private |
Parse an optionally typed factor tfact = fact[:type].
Definition at line 747 of file Parse.java.
References com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.type(), and com.cliffc.aa.Parse.typechk().
Referenced by com.cliffc.aa.Parse.term().
|
private |
Definition at line 1176 of file Parse.java.
References com.cliffc.aa.Parse._x, com.cliffc.aa.type.TypeFld.Access.Final, com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.peek_not(), com.cliffc.aa.type.TypeFld.Access.ReadOnly, and com.cliffc.aa.type.TypeFld.Access.RW.
Referenced by com.cliffc.aa.Parse.type0().
|
private |
Definition at line 1072 of file Parse.java.
References com.cliffc.aa.Parse.skipWS(), and com.cliffc.aa.Parse.token0().
Referenced by com.cliffc.aa.Parse.bal_open(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.tstmt(), and com.cliffc.aa.Parse.type0().
|
private |
Definition at line 1077 of file Parse.java.
References com.cliffc.aa.Parse._buf, com.cliffc.aa.Parse._x, com.cliffc.aa.Parse.isAlpha0(), com.cliffc.aa.Parse.isAlpha1(), com.cliffc.aa.Parse.isOp0(), and com.cliffc.aa.Parse.isOp1().
Referenced by com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.term(), and com.cliffc.aa.Parse.token().
String com.cliffc.aa.Parse.toString | ( | ) |
Definition at line 1490 of file Parse.java.
References com.cliffc.aa.Parse._buf, and com.cliffc.aa.Parse._x.
|
private |
A type-statement assigns a type to a type variable.
Type variable assignments are always final, and can not exist before assignment (hence a variable cannot have a normal value and be re-assigned as a type variable). In addition to allowing 'tvar' to appear in a type expression a pair of type constructor functions are made: one taking the base type and returning the same value as the named type, and the other for Structs taking the unpacked struct fields and returning the named type. The ':type' is the type being assigned; a space is allowed between '= :type'.
tstmt = tvar = :type
Definition at line 195 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.Parse._gvn, com.cliffc.aa.node.Node._val, com.cliffc.aa.Parse._x, com.cliffc.aa.Env.add_fun(), com.cliffc.aa.Env.add_type(), com.cliffc.aa.node.ConTypeNode.alias(), com.cliffc.aa.node.PrimNode.as_fun(), com.cliffc.aa.node.IntrinsicNode.convertTypeName(), com.cliffc.aa.node.PrimNode.convertTypeName(), com.cliffc.aa.node.IntrinsicNode.convertTypeNameStruct(), com.cliffc.aa.node.ConTypeNode.def_fref(), com.cliffc.aa.Parse.err_ctrl2(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.Parse.gvn(), com.cliffc.aa.Parse.lookup(), com.cliffc.aa.Env.lookup_type(), com.cliffc.aa.type.TypeMemPtr.make(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.type.BitsAlias.REC, com.cliffc.aa.Parse.scope(), com.cliffc.aa.type.Type< T extends Type< T >.set_name(), com.cliffc.aa.Parse.token(), com.cliffc.aa.type.BitsAlias.type_alias(), and com.cliffc.aa.Parse.typev().
Referenced by com.cliffc.aa.Parse.stmts().
Parse a tuple; first stmt but not the ',' parsed.
tuple= (stmts,[stmts,]) // Tuple; final comma is optional
Definition at line 843 of file Parse.java.
References com.cliffc.aa.node.NewObjNode._fld_starts, com.cliffc.aa.Env.ANY, com.cliffc.aa.Parse.args(), com.cliffc.aa.util.Ary< E >.asAry(), com.cliffc.aa.node.NewObjNode.create_active(), com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.type.TypeFld.Access.Final, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.Parse.init(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.node.DefMemNode.make_mem_proj(), com.cliffc.aa.Parse.mem(), com.cliffc.aa.type.TypeMemPtr.NO_DISP, com.cliffc.aa.node.NewObjNode.no_more_fields(), com.cliffc.aa.type.TypeStruct.open(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.util.Ary< E >.push(), com.cliffc.aa.Parse.require(), com.cliffc.aa.Parse.set_mem(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.Parse.stmts(), and com.cliffc.aa.node.Node.unkeep().
Referenced by com.cliffc.aa.Parse.fact(), and com.cliffc.aa.Parse.term().
|
private |
Parse a type or return null type = tcon | tfun | tary | tstruct | ttuple | tvar // Type choices tcon = int, int[1,8,16,32,64], flt, flt[32,64], real, str[?] tary = '[' type? ']' // Cannot specify type for array size tfun = {[[type]* ->]? type } // Function types mirror func decls tmod = = | := | == // '=' is r/final, ':=' is r/w, '==' is read-only tstruct = [id [tmod [type?]];]*} // Struct types are field names with optional types.
Spaces not allowed ttuple = ([type?] [,[type?]]*) // List of types, trailing comma optional tvar = A previously declared type variable
Unknown tokens when type_var is false are treated as not-a-type. When true, unknown tokens are treated as a forward-ref new type.
Definition at line 1152 of file Parse.java.
References com.cliffc.aa.Parse.typep().
Referenced by com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.stmt(), and com.cliffc.aa.Parse.tfact().
|
private |
Definition at line 1185 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.util.Ary< E >._len, com.cliffc.aa.node.Node._val, com.cliffc.aa.Parse._x, com.cliffc.aa.util.Ary< E >.add(), com.cliffc.aa.Env.add_type(), com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.type.Type< T extends Type< T >.ANY, com.cliffc.aa.util.Ary< E >.asAry(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.type.TypeMemPtr.DISP_FLD, com.cliffc.aa.type.TypeMemPtr.DISP_SIMPLE, com.cliffc.aa.util.Util.eq(), com.cliffc.aa.util.Ary< E >.find(), com.cliffc.aa.Parse.gvn(), com.cliffc.aa.type.TypeInt.INT64, com.cliffc.aa.type.TypeObj< O extends TypeObj< O >.ISUSED, com.cliffc.aa.Parse.lookup(), com.cliffc.aa.Env.lookup_type(), com.cliffc.aa.type.TypeAry.make(), com.cliffc.aa.type.TypeFld.make(), com.cliffc.aa.type.TypeMemPtr.make(), com.cliffc.aa.type.TypeFunSig.make(), com.cliffc.aa.type.TypeStruct.make(), com.cliffc.aa.type.TypeTuple.make_args(), com.cliffc.aa.type.TypeTuple.make_ret(), com.cliffc.aa.type.TypeFld.make_tup(), com.cliffc.aa.type.TypeObj< O extends TypeObj< O >.OBJ, com.cliffc.aa.Parse.peek(), com.cliffc.aa.util.Ary< E >.pop(), com.cliffc.aa.type.BitsAlias.REC, com.cliffc.aa.type.Type< T extends Type< T >.SCALAR, com.cliffc.aa.Parse.scope(), com.cliffc.aa.type.Type< T extends Type< T >.set_name(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.Parse.tmod(), com.cliffc.aa.Parse.token(), com.cliffc.aa.type.BitsAlias.type_alias(), com.cliffc.aa.Parse.typep(), and com.cliffc.aa.Parse.typeq().
Referenced by com.cliffc.aa.Parse.typep(), and com.cliffc.aa.Parse.typev().
Definition at line 1068 of file Parse.java.
References com.cliffc.aa.Parse._e, com.cliffc.aa.node.Node._val, com.cliffc.aa.Parse.gvn(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), and com.cliffc.aa.Parse.mem().
Referenced by com.cliffc.aa.Parse.stmt(), and com.cliffc.aa.Parse.tfact().
|
private |
Definition at line 1161 of file Parse.java.
References com.cliffc.aa.type.BitsAlias.AARY, com.cliffc.aa.type.TypeMemPtr.make(), com.cliffc.aa.type.BitsAlias.REC, com.cliffc.aa.type.BitsAlias.STR, com.cliffc.aa.Parse.type0(), and com.cliffc.aa.Parse.typeq().
Referenced by com.cliffc.aa.Parse.type(), and com.cliffc.aa.Parse.type0().
Definition at line 1172 of file Parse.java.
References com.cliffc.aa.type.Type< T extends Type< T >.meet_nil(), com.cliffc.aa.Parse.peek_noWS(), and com.cliffc.aa.type.Type< T extends Type< T >.XNIL.
Referenced by com.cliffc.aa.Parse.type0(), and com.cliffc.aa.Parse.typep().
|
private |
Definition at line 1155 of file Parse.java.
References com.cliffc.aa.type.Type< T extends Type< T >.ANY, and com.cliffc.aa.Parse.type0().
Referenced by com.cliffc.aa.Parse.tstmt().
|
private |
Definition at line 71 of file Parse.java.
Referenced by com.cliffc.aa.Parse.errLocMsg(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.field_number(), com.cliffc.aa.Parse.Parse(), com.cliffc.aa.Parse.peek1(), com.cliffc.aa.Parse.peek2(), com.cliffc.aa.Parse.peek_not(), com.cliffc.aa.Parse.peek_noWS(), com.cliffc.aa.Parse.require(), com.cliffc.aa.Parse.skipEOL(), com.cliffc.aa.Parse.skipNonWS(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.Parse.string(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.token0(), and com.cliffc.aa.Parse.toString().
|
private |
Definition at line 70 of file Parse.java.
Referenced by com.cliffc.aa.Parse._args(), com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse.bal_open(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.gather_errors(), com.cliffc.aa.Parse.get_display_ptr(), com.cliffc.aa.Parse.go(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.lookup(), com.cliffc.aa.Parse.lookup_scope(), com.cliffc.aa.Parse.Parse(), com.cliffc.aa.Parse.scope(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.struct(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.tstmt(), com.cliffc.aa.Parse.type0(), and com.cliffc.aa.Parse.typechk().
final GVNGCM com.cliffc.aa.Parse._gvn |
Definition at line 75 of file Parse.java.
Referenced by com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.go(), com.cliffc.aa.Parse.gvn(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.init(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.Parse.Parse(), com.cliffc.aa.Parse.prog(), and com.cliffc.aa.Parse.tstmt().
|
private |
Definition at line 73 of file Parse.java.
Referenced by com.cliffc.aa.Parse.apply(), com.cliffc.aa.Parse.Parse(), and com.cliffc.aa.Parse.skipWS().
|
private |
Definition at line 74 of file Parse.java.
Referenced by com.cliffc.aa.Parse.apply(), com.cliffc.aa.Parse.errLocMsg(), com.cliffc.aa.Parse.Parse(), and com.cliffc.aa.Parse.skipWS().
|
private |
Definition at line 78 of file Parse.java.
Referenced by com.cliffc.aa.Parse.number(), and com.cliffc.aa.Parse.Parse().
|
private |
Definition at line 79 of file Parse.java.
Referenced by com.cliffc.aa.Parse.number(), and com.cliffc.aa.Parse.Parse().
|
private |
Definition at line 69 of file Parse.java.
Referenced by com.cliffc.aa.Parse.compareTo(), com.cliffc.aa.Parse.equals(), com.cliffc.aa.Parse.errLocMsg(), com.cliffc.aa.Parse.hashCode(), and com.cliffc.aa.Parse.Parse().
|
private |
Definition at line 80 of file Parse.java.
Referenced by com.cliffc.aa.Parse.number(), and com.cliffc.aa.Parse.Parse().
|
private |
Definition at line 72 of file Parse.java.
Referenced by com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse.apply(), com.cliffc.aa.Parse.bal_open(), com.cliffc.aa.Parse.bfact(), com.cliffc.aa.Parse.compareTo(), com.cliffc.aa.Parse.equals(), com.cliffc.aa.Parse.errLocMsg(), com.cliffc.aa.Parse.errMsg(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.Parse.field_number(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.hashCode(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Parse.number(), com.cliffc.aa.Parse.Parse(), com.cliffc.aa.Parse.peek(), com.cliffc.aa.Parse.peek1(), com.cliffc.aa.Parse.peek2(), com.cliffc.aa.Parse.peek_not(), com.cliffc.aa.Parse.peek_noWS(), com.cliffc.aa.Parse.require(), com.cliffc.aa.Parse.skipEOL(), com.cliffc.aa.Parse.skipNonWS(), com.cliffc.aa.Parse.skipWS(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.stmts(), com.cliffc.aa.Parse.string(), com.cliffc.aa.Parse.struct(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.tfact(), com.cliffc.aa.Parse.tmod(), com.cliffc.aa.Parse.token0(), com.cliffc.aa.Parse.toString(), com.cliffc.aa.Parse.tstmt(), and com.cliffc.aa.Parse.type0().
|
staticprivate |
Parse an anonymous function; the opening '{' already parsed.
After the '{' comes an optional list of arguments and a '->' token, and then any number of statements separated by ';'. func = { [[id]* ->]? stmts }
Definition at line 896 of file Parse.java.
Referenced by com.cliffc.aa.Parse.func().