org.millscript.millscript.syntax
Class ImportSyntax
java.lang.Object
org.millscript.millscript.syntax.Syntax
org.millscript.millscript.syntax.PrefixSyntax
org.millscript.millscript.syntax.PkgReaderSyntax
org.millscript.millscript.syntax.ImportSyntax
- All Implemented Interfaces:
- PrefixSyntaxInterface
public final class ImportSyntax
- extends PkgReaderSyntax
This class implements import syntax. This is used to make
another package available in the current packages environment.
import [<expr> =] <expr>
The right hand expression is the name of the package to import, which must be
the full package name. The left hand side expression is optional, and allows
you to specify a nickname for the package. If you don't specify a nickname,
it will default to the part of the package name following the last period.
- See Also:
ImportExpr
|
Method Summary |
ImportExpr |
prefix(java.lang.String sym,
Parser parser)
Parse the syntax for the specified symbol, using the specified
Parser. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImportSyntax
public ImportSyntax()
prefix
public ImportExpr prefix(java.lang.String sym,
Parser parser)
- Description copied from interface:
PrefixSyntaxInterface
- Parse the syntax for the specified symbol, using the specified
Parser. The symbol is specified because different symbols
may share the same syntax, but result in slightly different expressions.
The Parser is supplied as the source to parse from.
- Specified by:
prefix in interface PrefixSyntaxInterface- Specified by:
prefix in class PrefixSyntax
- Parameters:
sym - the symbol to parse this syntax forparser - Parser to parse from, i.e. the source to parse from
- Returns:
- an expression for this syntax
- See Also:
PrefixSyntaxInterface.prefix(java.lang.String, org.millscript.millscript.syntax.Parser)
Copyright © 2001-2007 Open World Ltd. All Rights Reserved.