org.xdef.impl.compile.PreCompiler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xdef Show documentation
Show all versions of xdef Show documentation
X-definition 4.2 (Open Source Software)
The newest version!
package org.xdef.impl.compile;
import org.xdef.sys.Report;
import org.xdef.sys.ReportWriter;
import org.xdef.sys.SPosition;
import java.io.File;
import java.io.InputStream;
import java.net.URL;
import java.util.List;
/** Interface for preparing PNodes from sources for compiler (XML,XON.JSON etc)
* @author Vaclav Trojan
*/
public interface PreCompiler {
/** Parse string and addAttr it to the set of definitions.
* @param source The source string with definitions.
*/
public void parseString(final String source);
/** Parse string and addAttr it to the set of X-definitions.
* @param source source string with X-definitions.
* @param srcName pathname of source (URL or an identifying name or null).
*/
public void parseString(final String source, final String srcName);
/** Parse file with source X-definition and addAttr it to the set
* of definitions.
* @param file The file with with X-definitions.
*/
public void parseFile(final File file);
/** Parse InputStream source X-definition and addAttr it to the set
* of definitions.
* @param in input stream with the X-definition.
* @param srcName name of source data used in reporting (SysId) or
* null.
*/
public void parseStream(final InputStream in, final String srcName);
/** Parse data with source X-definition given by URL and addAttr it
* to the set of X-definitions.
* @param url URL of the file with the X-definition.
*/
public void parseURL(final URL url);
/** Parse file with source X-definition and addAttr it to the set
* of definitions.
* @param fileName pathname of file with with X-definitions.
*/
public void parseFile(final String fileName);
/** Get code generator.
* @return the code generator.
*/
public CompileCode getCodeGenerator();
/** Get sources of X-definitions.
* @return array with sources of X-definitions.
*/
public List