Uses of Class
net.hydromatic.morel.ast.Ast.Exp
-
Packages that use Ast.Exp Package Description net.hydromatic.morel.ast Abstract syntax tree.net.hydromatic.morel.compile Validates programs (represented asAstNode), deduces their type, and compiles them into code that can be evaluated. -
-
Uses of Ast.Exp in net.hydromatic.morel.ast
Subclasses of Ast.Exp in net.hydromatic.morel.ast Modifier and Type Class Description static classAst.AnnotatedExpParse tree node of an expression annotated with a type.static classAst.ApplyApplication of a function to its argument.static classAst.CaseCase expression.static classAst.FnLambda expression.static classAst.FromFrom expression.static classAst.IdParse tree node of an identifier.static classAst.If"If ...static classAst.InfixCallCall to an infix operator.static classAst.LetExp"Let" expression.static classAst.ListList.static classAst.LiteralParse tree node of a literal (constant).static classAst.PrefixCallCall to an prefix operator.static classAst.RecordRecord.static classAst.RecordSelectorParse tree node of a record selector.static classAst.TupleTuple.Fields in net.hydromatic.morel.ast declared as Ast.Exp Modifier and Type Field Description Ast.ExpAst.PrefixCall. aAst.ExpAst.InfixCall. a0Ast.ExpAst.InfixCall. a1Ast.ExpAst.Aggregate. aggregateAst.ExpAst.Apply. argAst.ExpAst.Aggregate. argumentAst.ExpAst.If. conditionAst.ExpAst.AnnotatedExp. eAst.ExpAst.Case. eAst.ExpAst.FunMatch. eAst.ExpAst.LetExp. eAst.ExpAst.Match. eAst.ExpAst.ValBind. eAst.ExpAst.From. filterExpAst.ExpAst.Apply. fnAst.ExpAst.If. ifFalseAst.ExpAst.If. ifTrueAst.ExpAst.From. yieldExpAst.ExpAst.From. yieldExpOrDefaultThe expression in the yield clause, or the default yield expression if not specified; never null.Fields in net.hydromatic.morel.ast with type parameters of type Ast.Exp Modifier and Type Field Description java.util.List<Ast.Exp>Ast.List. argsjava.util.Map<java.lang.String,Ast.Exp>Ast.Record. argsjava.util.List<Ast.Exp>Ast.Tuple. argscom.google.common.collect.ImmutableList<Pair<Ast.Exp,Ast.Id>>Ast.From. groupExpsjava.util.Map<Ast.Id,Ast.Exp>Ast.From. sourcesMethods in net.hydromatic.morel.ast that return Ast.Exp Modifier and Type Method Description Ast.ExpAst.AnnotatedExp. accept(Shuttle shuttle)Ast.ExpAst.Apply. accept(Shuttle shuttle)Ast.ExpAst.Case. accept(Shuttle shuttle)abstract Ast.ExpAst.Exp. accept(Shuttle shuttle)Ast.ExpAst.From. accept(Shuttle shuttle)Ast.ExpAst.If. accept(Shuttle shuttle)Ast.ExpAst.InfixCall. accept(Shuttle shuttle)Ast.ExpAst.LetExp. accept(Shuttle shuttle)Ast.ExpAst.Literal. accept(Shuttle shuttle)Ast.ExpAst.PrefixCall. accept(Shuttle shuttle)Ast.ExpAst.Record. accept(Shuttle shuttle)Ast.ExpAst.RecordSelector. accept(Shuttle shuttle)Ast.ExpAst.Tuple. accept(Shuttle shuttle)Ast.ExpAstBuilder. andAlso(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. annotatedExp(Pos pos, Ast.Type type, Ast.Exp expression)Ast.ExpAstBuilder. caret(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. cons(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. div(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. divide(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. equal(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. foldCons(java.util.List<Ast.Exp> list)Ast.ExpAstBuilder. greaterThan(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. greaterThanOrEqual(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. ifThenElse(Pos pos, Ast.Exp condition, Ast.Exp ifTrue, Ast.Exp ifFalse)Ast.ExpAstBuilder. infixCall(Pos pos, Op op, Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. lessThan(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. lessThanOrEqual(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. map(Pos pos, Ast.Exp e1, Ast.Exp e2)Ast.ExpAstBuilder. minus(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. mod(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. negate(Pos p, Ast.Exp a)Ast.ExpAstBuilder. notEqual(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. orElse(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. plus(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. record(Pos pos, java.util.Map<java.lang.String,Ast.Exp> map)Ast.ExpAstBuilder. times(Ast.Exp a0, Ast.Exp a1)protected Ast.ExpShuttle. visit(Ast.AnnotatedExp annotatedExp)protected Ast.ExpShuttle. visit(Ast.Case kase)Ast.ExpShuttle. visit(Ast.From from)protected Ast.ExpShuttle. visit(Ast.If anIf)protected Ast.ExpShuttle. visit(Ast.InfixCall infixCall)protected Ast.ExpShuttle. visit(Ast.Literal literal)Ast.ExpShuttle. visit(Ast.PrefixCall prefixCall)protected Ast.ExpShuttle. visit(Ast.Record record)protected Ast.ExpShuttle. visit(Ast.RecordSelector recordSelector)protected Ast.ExpShuttle. visit(Ast.Tuple tuple)Methods in net.hydromatic.morel.ast that return types with arguments of type Ast.Exp Modifier and Type Method Description java.util.List<Ast.Exp>Ast.Exp. args()Returns a list of all arguments.Methods in net.hydromatic.morel.ast with parameters of type Ast.Exp Modifier and Type Method Description Ast.AggregateAstBuilder. aggregate(Pos pos, Ast.Exp aggregate, Ast.Exp argument, Ast.Id id)Ast.ExpAstBuilder. andAlso(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. annotatedExp(Pos pos, Ast.Type type, Ast.Exp expression)Ast.ApplyAstBuilder. apply(Ast.Exp fn, Ast.Exp arg)Ast.ExpAstBuilder. caret(Ast.Exp a0, Ast.Exp a1)Ast.CaseAstBuilder. caseOf(Pos pos, Ast.Exp e, java.lang.Iterable<? extends Ast.Match> matchList)Ast.ExpAstBuilder. cons(Ast.Exp a0, Ast.Exp a1)Ast.ApplyAst.Apply. copy(Ast.Exp fn, Ast.Exp arg)Ast.FromAst.From. copy(java.util.Map<Ast.Id,Ast.Exp> sources, Ast.Exp filterExp, Ast.Exp yieldExp, java.util.List<Pair<Ast.Exp,Ast.Id>> groupExps, java.util.List<Ast.Aggregate> aggregates)Creates a copy of thisFromwith given contents, or this if the contents are the same.Ast.LetExpAst.LetExp. copy(java.lang.Iterable<Ast.Decl> decls, Ast.Exp e)Creates a copy of thisLetExpwith given contents, or this if the contents are the same.Ast.ValBindAst.ValBind. copy(boolean rec, Ast.Pat pat, Ast.Exp e)Creates a copy of thisValBindwith given contents, or this if the contents are the same.Ast.ExpAstBuilder. div(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. divide(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. equal(Ast.Exp a0, Ast.Exp a1)Ast.FromAstBuilder. from(Pos pos, java.util.Map<Ast.Id,Ast.Exp> sources, Ast.Exp filterExp, Ast.Exp yieldExp, java.util.List<Pair<Ast.Exp,Ast.Id>> groupExps, java.util.List<Ast.Aggregate> aggregates)Ast.FunMatchAstBuilder. funMatch(Pos pos, java.lang.String name, java.lang.Iterable<? extends Ast.Pat> patList, Ast.Exp e)Ast.ExpAstBuilder. greaterThan(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. greaterThanOrEqual(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. ifThenElse(Pos pos, Ast.Exp condition, Ast.Exp ifTrue, Ast.Exp ifFalse)java.lang.StringAstBuilder. implicitLabel(Ast.Exp e)private Ast.InfixCallAstBuilder. infix(Op op, Ast.Exp a0, Ast.Exp a1)Creates a call to an infix operator.Ast.ExpAstBuilder. infixCall(Pos pos, Op op, Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. lessThan(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. lessThanOrEqual(Ast.Exp a0, Ast.Exp a1)Ast.LetExpAstBuilder. let(Pos pos, java.lang.Iterable<? extends Ast.Decl> decls, Ast.Exp e)Ast.ExpAstBuilder. map(Pos pos, Ast.Exp e1, Ast.Exp e2)Ast.MatchAstBuilder. match(Pos pos, Ast.Pat pat, Ast.Exp e)Ast.ExpAstBuilder. minus(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. mod(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. negate(Pos p, Ast.Exp a)Ast.ExpAstBuilder. notEqual(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. orElse(Ast.Exp a0, Ast.Exp a1)Ast.ExpAstBuilder. plus(Ast.Exp a0, Ast.Exp a1)Ast.PrefixCallAstBuilder. prefixCall(Pos p, Op op, Ast.Exp a)Creates a call to a prefix operator.Ast.ExpAstBuilder. times(Ast.Exp a0, Ast.Exp a1)Ast.ValBindAstBuilder. valBind(Pos pos, boolean rec, Ast.Pat pat, Ast.Exp e)Method parameters in net.hydromatic.morel.ast with type arguments of type Ast.Exp Modifier and Type Method Description Ast.FromAst.From. copy(java.util.Map<Ast.Id,Ast.Exp> sources, Ast.Exp filterExp, Ast.Exp yieldExp, java.util.List<Pair<Ast.Exp,Ast.Id>> groupExps, java.util.List<Ast.Aggregate> aggregates)Creates a copy of thisFromwith given contents, or this if the contents are the same.Ast.FromAst.From. copy(java.util.Map<Ast.Id,Ast.Exp> sources, Ast.Exp filterExp, Ast.Exp yieldExp, java.util.List<Pair<Ast.Exp,Ast.Id>> groupExps, java.util.List<Ast.Aggregate> aggregates)Creates a copy of thisFromwith given contents, or this if the contents are the same.Ast.TupleAst.Tuple. copy(java.util.List<Ast.Exp> args)Ast.ExpAstBuilder. foldCons(java.util.List<Ast.Exp> list)voidAst.Exp. forEachArg(java.util.function.ObjIntConsumer<Ast.Exp> action)voidAst.InfixCall. forEachArg(java.util.function.ObjIntConsumer<Ast.Exp> action)voidAst.List. forEachArg(java.util.function.ObjIntConsumer<Ast.Exp> action)voidAst.PrefixCall. forEachArg(java.util.function.ObjIntConsumer<Ast.Exp> action)voidAst.Record. forEachArg(java.util.function.ObjIntConsumer<Ast.Exp> action)voidAst.Tuple. forEachArg(java.util.function.ObjIntConsumer<Ast.Exp> action)Ast.FromAstBuilder. from(Pos pos, java.util.Map<Ast.Id,Ast.Exp> sources, Ast.Exp filterExp, Ast.Exp yieldExp, java.util.List<Pair<Ast.Exp,Ast.Id>> groupExps, java.util.List<Ast.Aggregate> aggregates)Ast.FromAstBuilder. from(Pos pos, java.util.Map<Ast.Id,Ast.Exp> sources, Ast.Exp filterExp, Ast.Exp yieldExp, java.util.List<Pair<Ast.Exp,Ast.Id>> groupExps, java.util.List<Ast.Aggregate> aggregates)Ast.ListAstBuilder. list(Pos pos, java.lang.Iterable<? extends Ast.Exp> list)Ast.ExpAstBuilder. record(Pos pos, java.util.Map<java.lang.String,Ast.Exp> map)Ast.TupleAstBuilder. tuple(Pos pos, java.lang.Iterable<? extends Ast.Exp> list)Constructors in net.hydromatic.morel.ast with parameters of type Ast.Exp Constructor Description Aggregate(Pos pos, Ast.Exp aggregate, Ast.Exp argument, Ast.Id id)AnnotatedExp(Pos pos, Ast.Type type, Ast.Exp e)Creates a type annotation.Apply(Pos pos, Ast.Exp fn, Ast.Exp arg)Case(Pos pos, Ast.Exp e, com.google.common.collect.ImmutableList<Ast.Match> matchList)From(Pos pos, com.google.common.collect.ImmutableMap<Ast.Id,Ast.Exp> sources, Ast.Exp filterExp, Ast.Exp yieldExp, com.google.common.collect.ImmutableList<Pair<Ast.Exp,Ast.Id>> groupExps, com.google.common.collect.ImmutableList<Ast.Aggregate> aggregates)FunMatch(Pos pos, java.lang.String name, com.google.common.collect.ImmutableList<Ast.Pat> patList, Ast.Exp e)If(Pos pos, Ast.Exp condition, Ast.Exp ifTrue, Ast.Exp ifFalse)InfixCall(Pos pos, Op op, Ast.Exp a0, Ast.Exp a1)LetExp(Pos pos, com.google.common.collect.ImmutableList<Ast.Decl> decls, Ast.Exp e)Match(Pos pos, Ast.Pat pat, Ast.Exp e)PrefixCall(Pos pos, Op op, Ast.Exp a)ValBind(Pos pos, boolean rec, Ast.Pat pat, Ast.Exp e)Constructor parameters in net.hydromatic.morel.ast with type arguments of type Ast.Exp Constructor Description From(Pos pos, com.google.common.collect.ImmutableMap<Ast.Id,Ast.Exp> sources, Ast.Exp filterExp, Ast.Exp yieldExp, com.google.common.collect.ImmutableList<Pair<Ast.Exp,Ast.Id>> groupExps, com.google.common.collect.ImmutableList<Ast.Aggregate> aggregates)From(Pos pos, com.google.common.collect.ImmutableMap<Ast.Id,Ast.Exp> sources, Ast.Exp filterExp, Ast.Exp yieldExp, com.google.common.collect.ImmutableList<Pair<Ast.Exp,Ast.Id>> groupExps, com.google.common.collect.ImmutableList<Ast.Aggregate> aggregates)List(Pos pos, java.lang.Iterable<? extends Ast.Exp> args)Record(Pos pos, com.google.common.collect.ImmutableSortedMap<java.lang.String,Ast.Exp> args)Tuple(Pos pos, java.lang.Iterable<? extends Ast.Exp> args) -
Uses of Ast.Exp in net.hydromatic.morel.compile
Methods in net.hydromatic.morel.compile that return Ast.Exp Modifier and Type Method Description private Ast.ExpTypeResolver. comparison(TypeResolver.TypeEnv env, Ast.InfixCall call, Unifier.Variable v)Registers an infix operator whose type is a given type and whose arguments are the same type.private Ast.ExpTypeResolver. deduceConsType(TypeResolver.TypeEnv env, Ast.InfixCall call, Unifier.Variable v)private Ast.ExpTypeResolver. deduceType(TypeResolver.TypeEnv env, Ast.Exp node, Unifier.Variable v)Ast.ExpMacro. expand(Environment env)private static Ast.ExpTypeResolver. idTuple(java.util.List<java.lang.String> vars)Converts a list of variable names to a variable or tuple.private Ast.ExpTypeResolver. infix(TypeResolver.TypeEnv env, Ast.InfixCall call, Unifier.Variable v, Type type)Registers an infix operator whose type is a given type.private Ast.ExpTypeResolver. infixOverloaded(TypeResolver.TypeEnv env, Ast.InfixCall call, Unifier.Variable v, Type defaultType)Registers an infix or prefix operator whose type is the same as its arguments.private Ast.ExpTypeResolver. opOverloaded(TypeResolver.TypeEnv env, Ast.Exp call, Unifier.Variable v, Type defaultType)Registers an infix or prefix operator whose type is the same as its arguments.private Ast.ExpTypeResolver. prefixOverloaded(TypeResolver.TypeEnv env, Ast.PrefixCall call, Unifier.Variable v, Type defaultType)Registers an infix or prefix operator whose type is the same as its arguments.static Ast.ExpCompiles. toExp(Ast.ValDecl decl)Methods in net.hydromatic.morel.compile with parameters of type Ast.Exp Modifier and Type Method Description CodeCompiler. compile(Environment env, Ast.Exp expression)private ApplicableCompiler. compileApplicable(Environment env, Ast.Exp fn)Compiles a function value to anApplicable, if possible, or returns null.private CodeCompiler. compileLet(Environment env, java.util.List<Ast.Decl> decls, Ast.Exp e)private CodeCompiler. compileLet(Environment env, Ast.Decl decl, Ast.Exp e)private CodeCompiler. compileUnary(Environment env, Ast.Exp call)private Ast.ExpTypeResolver. deduceType(TypeResolver.TypeEnv env, Ast.Exp node, Unifier.Variable v)private voidCompiler. flatten(java.util.Map<Ast.Pat,Ast.Exp> matches, Ast.Pat pat, Ast.Exp exp)private Ast.LetExpCompiler. flattenLet(java.util.List<Ast.Decl> decls, Ast.Exp e)private Ast.ExpTypeResolver. opOverloaded(TypeResolver.TypeEnv env, Ast.Exp call, Unifier.Variable v, Type defaultType)Registers an infix or prefix operator whose type is the same as its arguments.static Ast.ValDeclCompiles. toValDecl(Ast.Exp statement)Convertsetoval = e.static TypeResolver.ResolvedCompiles. validateExpression(Ast.Exp exp, java.util.Map<java.lang.String,ForeignValue> valueMap)Validates an expression, deducing its type and perhaps rewriting the expression to a form that can more easily be compiled.Method parameters in net.hydromatic.morel.compile with type arguments of type Ast.Exp Modifier and Type Method Description private voidCompiler. flatten(java.util.Map<Ast.Pat,Ast.Exp> matches, Ast.Pat pat, Ast.Exp exp)
-