tartar
/
com.github.adriantodt.tartar.impl
/
ParserImpl
common
Parser
Impl
class
ParserImpl
<
T
,
E
,
R
>(grammar:
Grammar
<
T
,
E
>, block:
Closure
<
ParserContext
<
T
,
E
>,
R
>) :
Parser
<
T
,
E
,
R
>
Content copied to clipboard
Types
Functions
Properties
Types
ContextImpl
Link copied to clipboard
common
inner class
ContextImpl
(source:
Source
, tokens:
List
<
Token
<
T
>>, grammar:
Grammar
<
T
,
E
>) :
ParserContext
<
T
,
E
>
Content copied to clipboard
Functions
parse
Link copied to clipboard
common
open fun
parse
(source:
Source
, lexer:
Lexer
<
Token
<
T
>>):
R
Content copied to clipboard
Parses tokens from a source, using a specified lexer, with this pratt-parser, and returns the computed result.
open override fun
parse
(source:
Source
, tokens:
List
<
Token
<
T
>>):
R
Content copied to clipboard
Parses tokens with this pratt-parser and returns the computed result.
Properties
grammar
Link copied to clipboard
common
open override val
grammar
:
Grammar
<
T
,
E
>
Content copied to clipboard
The
Grammar
of this pratt-parser.