public static AbstractTCLNode parse( String data )
throws ParseException
{
try
{
final TokenStreamSelector _selector = new TokenStreamSelector();
// set up two Lexers
final TCLLexer _tclLexer = new TCLLexer( new StringReader( data ) );
_tclLexer.setTokenStreamSelector( _selector );
final ComponentLexer _compLexer =
new ComponentLexer( _tclLexer.getInputState() );
_compLexer.setTokenStreamSelector( _selector );
_selector.addInputStream( _tclLexer,
TCLLexer.LEXER_NAME );
_selector.addInputStream( _compLexer,
ComponentLexer.LEXER_NAME );
_selector.select( TCLLexer.LEXER_NAME );
// connect the Parser with the two Lexers
final TCLParser _parser = new TCLParser( _selector );
// begin parse