org.rubato.scheme
Class Parser

java.lang.Object
  extended by org.rubato.scheme.Parser

public class Parser
extends java.lang.Object

This class provides the parser for Scheme expressions. The main methods are parse() and parse(String).

Author:
Gérard Milmeister

Constructor Summary
Parser()
          Creates a Scheme parser.
Parser(java.lang.String source)
          Creates a Scheme parser and initializes it with the given source.
 
Method Summary
 void clearError()
          Removes all errors.
 java.lang.String getError()
          Returns the error message of the last parsing.
 boolean hasError()
          Returns true iff the last parsing had an error.
 java.util.List<SExpr> parse()
          Parses the initial source and returns a list of the parsed expressions.
 java.util.List<SExpr> parse(java.lang.String src)
          Parses the specified source and returns a list of the parsed expressions.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser()
Creates a Scheme parser.


Parser

public Parser(java.lang.String source)
Creates a Scheme parser and initializes it with the given source.

Method Detail

parse

public java.util.List<SExpr> parse(java.lang.String src)
Parses the specified source and returns a list of the parsed expressions.


parse

public java.util.List<SExpr> parse()
Parses the initial source and returns a list of the parsed expressions.


clearError

public void clearError()
Removes all errors.


hasError

public boolean hasError()
Returns true iff the last parsing had an error.


getError

public java.lang.String getError()
Returns the error message of the last parsing.