Package convex.core.lang
Class Reader
java.lang.Object
convex.core.lang.Reader
Reader implementation which reads source code and produces a tree
of parsed objects.
Supports reading in either raw form (ACell) mode or wrapping with Syntax Objects. The
latter is required for source references etc.
"Talk is cheap. Show me the code." - Linus Torvalds
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ACell
Parses an expression and returns a form as an Objectstatic <R extends ACell>
RParses an expression and returns a canonical Cell representing a formParses an String to returns a list of raw formsstatic ACell
readResource
(String path) static ACell
readResourceAsData
(String path) static Syntax
readSyntax
(String source) Parses an expression and returns a Syntax object
-
Constructor Details
-
Reader
public Reader()
-
-
Method Details
-
readSyntax
-
readResource
-
readResourceAsData
- Throws:
IOException
-
readAll
-
read
Parses an expression and returns a form as an Object- Parameters:
source
- Reader instance to get expression from- Returns:
- Parsed form (may be nil)
- Throws:
IOException
-
read
-