Package edu.cornell.cs.apl.viaduct.parsing
Types
ProtocolArguments
Link copied to clipboard
A map from argument labels to Values.
ProtocolParser
Link copied to clipboard
A parser for protocols of type P.
SourceFile
Link copied to clipboard
Maintains metadata (for example, file path) about an input stream and gives access to its contents.
SourcePosition
Link copied to clipboard
data class SourcePosition(sourceFile: SourceFile, offset: Int) : Comparable<SourcePosition>
Content copied to clipboard
Represents a position in a source file. Positions correspond to spaces between characters rather than characters themselves.
SourceRange
Link copied to clipboard
Denotes a nonempty set of consecutive characters in a source file. Empty ranges are not allowed, since there is no column number that corresponds to a single position.
Functions
parse
Link copied to clipboard
fun SourceFile.parse(protocolParsers: Map<ProtocolName, ProtocolParser<Protocol>> = defaultProtocolParsers): ProgramNode
Content copied to clipboard
Parses this source file and returns the AST.
fun String.parse(path: String = "<string>", protocolParsers: Map<ProtocolName, ProtocolParser<Protocol>> = defaultProtocolParsers): ProgramNode
Content copied to clipboard
Parses this string and returns the AST.
parseLabel
Link copied to clipboard
Properties
defaultProtocolParsers
Link copied to clipboard
val defaultProtocolParsers: PersistentMap<ProtocolName, ProtocolParser<Protocol>>
Content copied to clipboard