SmartFrog 3.10.000

org.smartfrog.sfcore.parser
Interface StreamLanguageParser

All Known Implementing Classes:
SFParser, SFParser

public interface StreamLanguageParser

Defines the actual low-level parser interface. Objects that implement this interface provide the means to parse SmartFrog text into component descriptions.


Method Summary
 Phases sfParse(java.io.InputStream is)
          Parses component(s) from an input stream.
 Phases sfParse(java.io.InputStream is, java.lang.String codebase)
          Parses component(s) from an input stream.
 java.lang.Object sfParseAnyValue(java.io.InputStream is)
          Parses any value from an input stream.
 java.lang.Object sfParsePrimitiveValue(java.io.InputStream is)
          Parses a primitive value from an input stream.
 ReferencePhases sfParseReference(java.io.InputStream is)
          Parses a reference from an input stream.
 

Method Detail

sfParse

Phases sfParse(java.io.InputStream is)
               throws SmartFrogParseException
Parses component(s) from an input stream. Returns a root component which contains the parsed components. Includes should be handled by some default include handler.

Parameters:
is - input stream to parse and compile from
Returns:
root component containing parsed component(s)
Throws:
SmartFrogParseException - error parsing stream

sfParse

Phases sfParse(java.io.InputStream is,
               java.lang.String codebase)
               throws SmartFrogParseException
Parses component(s) from an input stream. Returns a root component which contains the parsed components. Includes should be handled by some default include handler.

Parameters:
is - input stream to parse and compile from
codebase - an optional codebase where the include may be found. If null, use the default code base
Returns:
root component containing parsed component(s)
Throws:
SmartFrogParseException - error parsing stream

sfParseReference

ReferencePhases sfParseReference(java.io.InputStream is)
                                 throws SmartFrogParseException
Parses a reference from an input stream. Used by components and developers to quickly build references from a string (eg. sfResolve in Prim)

Parameters:
is - input stream to parse for a reference
Returns:
parsed reference
Throws:
SmartFrogParseException - failed to parse reference

sfParseAnyValue

java.lang.Object sfParseAnyValue(java.io.InputStream is)
                                 throws SmartFrogParseException
Parses any value from an input stream. (the meaning of "any" is language dependant)

Parameters:
is - input stream to parse for a value
Returns:
parsed value
Throws:
SmartFrogParseException - failed to parse any value

sfParsePrimitiveValue

java.lang.Object sfParsePrimitiveValue(java.io.InputStream is)
                                       throws SmartFrogParseException
Parses a primitive value from an input stream. (the meaning of primitive is language dependant)

Parameters:
is - input stream to parse for a value
Returns:
parsed value
Throws:
SmartFrogParseException - failed to parse primtiive value

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP