Class EsExprParser


  • public final class EsExprParser
    extends java.lang.Object
    EsExprParser translates Lisp-like syntax into EsExpr. 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EsExprParser

        public EsExprParser​(java.io.Reader reader)
        Create new parser for given reader.
        Parameters:
        reader - Reader instance to read input from
    • 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 - if s is null