Package ru.ispras.fortress.esexpr
Class EsExprParser
- java.lang.Object
-
- ru.ispras.fortress.esexpr.EsExprParser
-
public final class EsExprParser extends java.lang.Object
EsExprParser
translates Lisp-like syntax intoEsExpr
. Supports only ASCII characters, treats ';' as start of one-line comment, does not support multiline symbols and treats them as sequence of expressions.
-
-
Constructor Summary
Constructors Constructor Description EsExprParser(java.io.Reader reader)
Create new parser for given reader.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EsExpr
next()
Returns next complete S-expression read from input.static EsExprParser
stringParser(java.lang.String str)
Creates parser for given string.
-
-
-
Method Detail
-
next
public EsExpr next() throws java.io.IOException
Returns next complete S-expression read from input.- Returns:
- complete S-expression.
- Throws:
java.io.IOException
- if an I/O error occurs.
-
stringParser
public static EsExprParser stringParser(java.lang.String str)
Creates parser for given string.- Parameters:
str
- string to parse- Returns:
- parser for given string
- Throws:
java.lang.IllegalArgumentException
- ifs
isnull
-
-