Package convex.core.lang
Class Reader
java.lang.Object
convex.core.lang.Reader
Parboiled Parser 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 formParses an expression list and 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
Parses an expression and returns a Syntax object- Parameters:
source
-- Returns:
- Parsed form
-
readResource
-
readResourceAsData
- Throws:
IOException
-
readAll
Parses an expression list and returns a list of raw forms- Parameters:
source
-- Returns:
- List of Syntax Objects
-
read
Parses an expression and returns a form as an Object- Parameters:
source
-- Returns:
- Parsed form
- Throws:
IOException
-
read
Parses an expression and returns a form- Parameters:
source
-- Returns:
- Parsed form
-