当前位置: 首页>>代码示例>>Java>>正文


Java ASTExpressionList类代码示例

本文整理汇总了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);
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:25,代码来源:StatementReader.java

示例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);
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:12,代码来源:ASTCallObjectStatement.java

示例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;
}
  }
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:42,代码来源:StatementReader.java

示例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;
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:62,代码来源:StatementReader.java

示例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;
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:44,代码来源:StatementReader.java

示例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;
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:7,代码来源:ASTSporadicStatement.java

示例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;
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:7,代码来源:ASTPeriodicStatement.java

示例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;
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:7,代码来源:ASTObjectApplyDesignator.java

示例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);
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:6,代码来源:ASTObjectNewDesignator.java

示例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;
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:7,代码来源:ASTCallStatement.java

示例11: TCExpressionList

import com.fujitsu.vdmj.ast.expressions.ASTExpressionList; //导入依赖的package包/类
public TCExpressionList(ASTExpressionList from) throws Exception
{
	super(from);
}
 
开发者ID:nickbattle,项目名称:FJ-VDMJ,代码行数:5,代码来源:TCExpressionList.java


注:本文中的com.fujitsu.vdmj.ast.expressions.ASTExpressionList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。