public void addRuleParserBefore ( IRuleParser parser , Class < ? extends IRuleParser > beforeParser ) { int index = getIndexOfClass ( ruleParsers , beforeParser ) ; if ( index == - 1 ) { throw new ParserAddException ( "parser " + beforeParser . getSimpleName ( ) + " has not been added" ) ; } ruleParsers . add ( index , parser ) ; }
add parser before