Opened 15 years ago

Closed 15 years ago

#303 closed defect (fixed)

make invocation of clang parser portable

Reported by: Stephen Siegel Owned by:
Priority: minor Milestone: 1.1
Component: User Interface Version: 1.1
Keywords: Cc:

Description

This code in Runner.java is not portable. Cannot assume user has the source tree. Perhaps use instead build.properties to specify paths. The xml directory can be moved to another place if needed.

			Runtime runtime = Runtime.getRuntime();
				ModelBuilderIF modelBuilder = new ModelBuilder();
				File xmlFile;
				File schemaFile = new File(
						verifyConfiguration.workingDirectory()
								.getAbsolutePath()
								+ "/../src/edu/udel/cis/vsl/tass/ast/xml/version2/tass_ast.xsd");
				ASTParserIF parser;
				// TODO: Check whether we are on Darwin or Linux and use the
				// correct library extension
				String command = "clang -cc1 -load clang/printTassAST/Debug+Asserts/lib/libPrintTassAST.dylib -iwithsysroot ";

Change History (3)

comment:1 by Stephen Siegel, 15 years ago

Hard-coded path also occurs in build.xml:

	<target name="test-ast" depends="compile">
	  <java classname="edu.udel.cis.vsl.tass.ast.SAXParserDriver"
			classpath="bin">
		<arg value="src/edu/udel/cis/vsl/tass/ast/xml/version2/tass_ast.xsd" />
		<arg value="examples/xml/example.xml" />
	  </java>
	</target>

in reply to:  1 comment:2 by stachnik, 15 years ago

SAXParserDriver is only a temporary class used for development of the parser. Nothing else should import it and I'm planning to remove the class as soon as we're able to integrate the parser into the rest of the TASS toolchain. The use of a hard-coded path for the test-ast target is only a convenience as the target serves no useful purpose other than for debugging the parser.

Replying to siegel:

Hard-coded path also occurs in build.xml:

	<target name="test-ast" depends="compile">
	  <java classname="edu.udel.cis.vsl.tass.ast.SAXParserDriver"
			classpath="bin">
		<arg value="src/edu/udel/cis/vsl/tass/ast/xml/version2/tass_ast.xsd" />
		<arg value="examples/xml/example.xml" />
	  </java>
	</target>

comment:3 by Stephen Siegel, 15 years ago

Resolution: fixed
Status: newclosed

Fixed. Configuration parameters are now set in build.properties.

Note: See TracTickets for help on using tickets.