All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lphy.base.parser.newick.NewickParser.g4 Maven / Gradle / Ivy

Go to download

The standard library of LPhy, which contains the required generative distributions and basic functions.

The newest version!
parser grammar NewickParser;

options { tokenVocab=NewickLexer; }

tree: node ';'? EOF;

node: ('(' node (COMMA node)* ')')? post ;

post: label? nodeMeta=meta? (':' lengthMeta=meta? length=number)? ;

label: number | STRING ;

meta: '[&' attrib (ACOMMA attrib)* ']' ;

attrib: attribKey=ASTRING '=' attribValue ;

attribValue: attribNumber | ASTRING | vector;

number: INT | FLOAT | FLOAT_SCI;
attribNumber: AINT | AFLOAT | AFLOAT_SCI;

vector: '{' attribValue (ACOMMA attribValue)* '}' ;





© 2015 - 2024 Weber Informatics LLC | Privacy Policy