Back to index

wims  3.65+svn20090927
Package Functions | Package Attributes | Static Private Attributes
org.javia.arity.Declaration Class Reference

List of all members.

Package Functions

void parse (String source, Lexer lexer, DeclarationParser declParser) throws SyntaxException
void parse (String source, Lexer lexer, DeclarationParser declParser) throws SyntaxException

Package Attributes

String name
String args []
int arity
String expression

Static Private Attributes

static final String NO_ARGS [] = {}

Detailed Description

Definition at line 19 of file Declaration.java.


Member Function Documentation

void org.javia.arity.Declaration.parse ( String  source,
Lexer  lexer,
DeclarationParser  declParser 
) throws SyntaxException [inline, package]

Definition at line 26 of file Declaration.java.

                                                                                                {
        int equalPos = source.indexOf('=');
        String decl;

        if (equalPos == -1) {
            decl       = null;
            expression = source;
            name  = null;
            args  = NO_ARGS;
            arity = DeclarationParser.UNKNOWN_ARITY;            
        } else {
            decl       = source.substring(0, equalPos);
            expression = source.substring(equalPos + 1);
            lexer.scan(decl, declParser);
            name  = declParser.name;
            args  = declParser.argNames();
            arity = declParser.arity;            
        }
        /*
        if (arity == DeclarationParser.UNKNOWN_ARITY) {
            args = IMPLICIT_ARGS;
        }
        */
    }

Here is the caller graph for this function:

void org.javia.arity.Declaration.parse ( String  source,
Lexer  lexer,
DeclarationParser  declParser 
) throws SyntaxException [inline, package]

Definition at line 26 of file Declaration.java.

                                                                                                {
        int equalPos = source.indexOf('=');
        String decl;

        if (equalPos == -1) {
            decl       = null;
            expression = source;
            name  = null;
            args  = NO_ARGS;
            arity = DeclarationParser.UNKNOWN_ARITY;            
        } else {
            decl       = source.substring(0, equalPos);
            expression = source.substring(equalPos + 1);
            lexer.scan(decl, declParser);
            name  = declParser.name;
            args  = declParser.argNames();
            arity = declParser.arity;            
        }
        /*
        if (arity == DeclarationParser.UNKNOWN_ARITY) {
            args = IMPLICIT_ARGS;
        }
        */
    }

Member Data Documentation

Definition at line 22 of file Declaration.java.

Definition at line 23 of file Declaration.java.

Definition at line 24 of file Declaration.java.

Definition at line 21 of file Declaration.java.

static final String org.javia.arity.Declaration.NO_ARGS = {} [static, private]

Definition at line 20 of file Declaration.java.


The documentation for this class was generated from the following files: