incubator-imperius-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wood (JIRA)" <j...@apache.org>
Subject [jira] Created: (IMPERIUS-13) Import of java.lang.String causes parse error.
Date Fri, 25 Jul 2008 20:45:31 GMT
Import of java.lang.String causes parse error.
----------------------------------------------

                 Key: IMPERIUS-13
                 URL: https://issues.apache.org/jira/browse/IMPERIUS-13
             Project: Imperius
          Issue Type: Bug
         Environment: Windows XP,
            Reporter: David Wood
            Assignee: Bill Stoddard


If I try to Import java.lang.String:str; then I get a parse error. When the code below is
run, I get 

Begin parsing with import1
Done parsing with import1
 
Begin parsing with import2
import2:1:25: expecting IDENT, found 'String'
<AST>:1:0: unexpected AST node: Strategy
Done parsing with import2

--------------------------------------------------------
public class ParserTest {

	final static String import1 =  "Import  Class java.util.Properties:str;";
	
	final static String import2 =  "Import  Class java.lang.String:str;";
		
	final static String restOfPolicy = 
	  "Strategy Execute_All_Applicable;"
	+ "Policy \n"
	+ "{\n"
	+ "	Condition \n"
	+ "	{\n"  
	+ " 	4 == 4\n"
	+ "	}\n"
	+ "	Decision \n"
	+ "	{   \n"
	+ "		ReturnValues(\"xxx\",\"yyy\") "
	+ "	}\n"
	+ "}:1;\n";

	public static void main(String[] args) throws SPLException, IOException, PMLException {
		
		ActuatorFactory.registerActuator(new JavaActuatorImpl());
		DataCollectorFactory.registerDataCollector(new JavaDataCollectorImpl());
		PolicyParserImpl parser = new PolicyParserImpl();
		
		System.err.println("Begin parsing with import1");
		parser.createInternalPolicyObject("import1",import1 + restOfPolicy);
		System.err.println("Done parsing with import1\n ");
		
		System.err.println("Begin parsing with import2");
		parser.createInternalPolicyObject("import2",import2 + restOfPolicy);
		System.err.println("Done parsing with import2");
	}

}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message