本文整理汇总了Java中com.fujitsu.vdmj.ast.expressions.ASTExpressionList类的典型用法代码示例。如果您正苦于以下问题:Java ASTExpressionList类的具体用法?Java ASTExpressionList怎么用?Java ASTExpressionList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ASTExpressionList类属于com.fujitsu.vdmj.ast.expressions包,在下文中一共展示了ASTExpressionList类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readSimpleCallStatement
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
private ASTStatement readSimpleCallStatement()
throws ParserException, LexException
{
LexNameToken name =
readNameToken("Expecting operation name in call statement");
checkFor(Token.BRA, 2206, "Expecting '(' after call operation name");
ASTExpressionList args = new ASTExpressionList();
ExpressionReader er = getExpressionReader();
if (lastToken().isNot(Token.KET))
{
args.add(er.readExpression());
while (ignore(Token.COMMA))
{
args.add(er.readExpression());
}
}
checkFor(Token.KET, 2124, "Expecting ')' after args");
return new ASTCallStatement(name, args);
}
示例2: ASTCallObjectStatement
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
public ASTCallObjectStatement(ASTObjectDesignator designator,
LexNameToken classname, ASTExpressionList args)
{
super(designator.location);
this.designator = designator;
this.classname = classname;
this.fieldname = null;
this.args = args;
this.explicit = (classname.module != null);
}
示例3: readObjectCallStatement
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
private ASTStatement readObjectCallStatement()
throws ParserException, LexException
{
ASTObjectDesignator designator = readObjectDesignator();
// All operation calls actually look like object apply designators,
// since they end with <name>([args]). So we unpick the apply
// designator to extract the operation name and args.
if (!(designator instanceof ASTObjectApplyDesignator))
{
throwMessage(2064, "Expecting <object>.identifier(args) or name(args)");
}
ASTObjectApplyDesignator oad = (ASTObjectApplyDesignator)designator;
ASTExpressionList args = oad.args;
if (oad.object instanceof ASTObjectFieldDesignator)
{
ASTObjectFieldDesignator ofd = (ASTObjectFieldDesignator)oad.object;
if (ofd.classname != null)
{
return new ASTCallObjectStatement(ofd.object, ofd.classname, args);
}
else
{
return new ASTCallObjectStatement(ofd.object, ofd.fieldname, args);
}
}
else if (oad.object instanceof ASTObjectIdentifierDesignator)
{
ASTObjectIdentifierDesignator oid = (ASTObjectIdentifierDesignator)oad.object;
return new ASTCallStatement(oid.name, args);
}
else
{
throwMessage(2065, "Expecting <object>.name(args) or name(args)");
return null;
}
}
示例4: readObjectDesignator
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
private ASTObjectDesignator readObjectDesignator()
throws ParserException, LexException
{
ASTObjectDesignator des = readSimpleObjectDesignator();
boolean done = false;
while (!done)
{
switch (lastToken().type)
{
case POINT:
LexToken field = nextToken();
// If we just read a qualified name, we're dealing with
// something like new A().X`op(), else it's the more usual
// new A().op().
switch (field.type)
{
case IDENTIFIER:
des = new ASTObjectFieldDesignator(des, (LexIdentifierToken)field);
break;
case NAME:
des = new ASTObjectFieldDesignator(des, (LexNameToken)field);
break;
default:
throwMessage(2066, "Expecting object field name");
}
nextToken();
break;
case BRA:
nextToken();
ExpressionReader er = getExpressionReader();
ASTExpressionList args = new ASTExpressionList();
if (lastToken().isNot(Token.KET))
{
args.add(er.readExpression());
while (ignore(Token.COMMA))
{
args.add(er.readExpression());
}
}
checkFor(Token.KET, 2124, "Expecting ')' after args");
des = new ASTObjectApplyDesignator(des, args);
break;
default:
done = true;
break;
}
}
return des;
}
示例5: readSimpleObjectDesignator
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
private ASTObjectDesignator readSimpleObjectDesignator()
throws LexException, ParserException
{
LexToken token = readToken();
switch (token.type)
{
case SELF:
return new ASTObjectSelfDesignator(token.location);
case IDENTIFIER:
return new ASTObjectIdentifierDesignator(idToName((LexIdentifierToken)token));
case NAME:
return new ASTObjectIdentifierDesignator((LexNameToken)token);
case NEW:
LexIdentifierToken name = readIdToken("Expecting class name after 'new'");
checkFor(Token.BRA, 2207, "Expecting '(' after new class name");
ASTExpressionList args = new ASTExpressionList();
ExpressionReader er = getExpressionReader();
if (lastToken().isNot(Token.KET))
{
args.add(er.readExpression());
while (ignore(Token.COMMA))
{
args.add(er.readExpression());
}
}
checkFor(Token.KET, 2124, "Expecting ')' after constructor args");
return new ASTObjectNewDesignator(name, args);
default:
throwMessage(2067, "Expecting 'self', 'new' or name in object designator");
break;
}
return null;
}
示例6: ASTSporadicStatement
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
public ASTSporadicStatement(LexNameToken opname, ASTExpressionList args)
{
super(opname.location);
this.opname = opname;
this.args = args;
}
示例7: ASTPeriodicStatement
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
public ASTPeriodicStatement(LexNameToken opname, ASTExpressionList args)
{
super(opname.location);
this.opname = opname;
this.args = args;
}
示例8: ASTObjectApplyDesignator
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
public ASTObjectApplyDesignator(ASTObjectDesignator object, ASTExpressionList args)
{
super(object.location);
this.object = object;
this.args = args;
}
示例9: ASTObjectNewDesignator
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
public ASTObjectNewDesignator(LexIdentifierToken classname, ASTExpressionList args)
{
super(classname.location);
this.expression = new ASTNewExpression(classname.location, classname, args);
}
示例10: ASTCallStatement
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
public ASTCallStatement(LexNameToken name, ASTExpressionList args)
{
super(name.location);
this.name = name;
this.args = args;
}
示例11: TCExpressionList
import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
public TCExpressionList(ASTExpressionList from) throws Exception
{
super(from);
}