S P P T Parser
interface SPPTParser
Content copied to clipboard
grammar Tree { skip WHITESPACE : "\s+" ;
tree : node ; nodes : node+ ; node : branch | leaf | EMPTY ; branch : NAME '{' nodes '}' ; leaf : LITERAL | pattern ; pattern : PATTERN ':' LITERAL ; PATTERN : "\"(^\"\\|\\.)\"" ; LITERAL : "'(^'\\|\\.)'" ; EMPTY : '§empty' ;
NAME : "a-zA-Z_0-9*" ; //same as IDENTIFIER from OGL.ogl }
Functions
parse
Link copied to clipboard
abstract fun parse(treeAsString: String, addTree: Boolean = false): SharedPackedParseTree
Content copied to clipboard