private void convertOptions ( ) throws TreeException { options = new Properties ( ) ; ParseTreeNode optionList = parserTree . getChild ( "GrammarOptions" ) . getChild ( "GrammarOptionList" ) ; for ( ParseTreeNode option : optionList . getChildren ( "GrammarOption" ) ) { String name = option . getChild ( "PropertyIdentifier" ) . getText ( ) ; String value = option . getChild ( "Literal" ) . getText ( ) ; if ( value . startsWith ( "'" ) || value . startsWith ( "\"" ) ) { value = value . substring ( 1 , value . length ( ) - 1 ) ; } options . put ( name , value ) ; } // normalizeToBNF = Boolean.valueOf(options.getProperty( // "grammar.normalize_to_bnf", "true")); }
This method converts the options part of the AST .