SmartFrog 3.10.000

org.smartfrog.sfcore.parser
Interface StreamParser

All Known Subinterfaces:
Parser
All Known Implementing Classes:
SFParser

public interface StreamParser

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.
 ComponentDescription sfParseComponentDescription(java.io.InputStream is)
          Parses a component description from an input stream.
 java.lang.Object sfParsePrimitiveValue(java.io.InputStream is)
          Parses a primitive value from an input stream.
 Reference 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

Reference sfParseReference(java.io.InputStream is)
                           throws SmartFrogCompilationException
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:
SmartFrogCompilationException - failed to parse reference

sfParseAnyValue

java.lang.Object sfParseAnyValue(java.io.InputStream is)
                                 throws SmartFrogCompilationException
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
SmartFrogCompilationException

sfParsePrimitiveValue

java.lang.Object sfParsePrimitiveValue(java.io.InputStream is)
                                       throws SmartFrogCompilationException
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
SmartFrogCompilationException

sfParseComponentDescription

ComponentDescription sfParseComponentDescription(java.io.InputStream is)
                                                 throws SmartFrogCompilationException
Parses a component description from an input stream. All the language phases will have been applied, and the conversion to ComponentDescription carried out.

Parameters:
is - input stream to parse for a value
Returns:
parsed component description
Throws:
SmartFrogParseException - failed to parse primitive value
SmartFrogCompilationException

SmartFrog CORE 3.10.000

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