token = new ElementToken( new ElementExp[]{cowner} ); } else { if( errRef!=null ) token = new ElementToken( ((ComplexAcceptor)child).owners ); else token = new ElementToken( ((ComplexAcceptor)child).getSatisfiedOwners() );
token = new ElementToken( new ElementExp[]{cowner} ); } else { if( errRef!=null ) token = new ElementToken( ((ComplexAcceptor)child).owners ); else token = new ElementToken( ((ComplexAcceptor)child).getSatisfiedOwners() );
token = new ElementToken( new ElementExp[]{cowner} ); } else { if( errRef!=null ) token = new ElementToken( ((ComplexAcceptor)child).owners ); else token = new ElementToken( ((ComplexAcceptor)child).getSatisfiedOwners() );
token = new ElementToken( new ElementExp[]{cowner} ); } else { if( errRef!=null ) token = new ElementToken( ((ComplexAcceptor)child).owners ); else token = new ElementToken( ((ComplexAcceptor)child).getSatisfiedOwners() );
public boolean stepForward( Acceptor child, StringRef errRef ) { // TODO: explicitly mention that where the error recovery should be done. if( child instanceof SimpleAcceptor ) { SimpleAcceptor sa = (SimpleAcceptor)child; if(sa.continuation!=null) // if the continuation is available, // the stepForward will be very fast. return stepForwardByContinuation( sa.continuation, errRef ); else // otherwise we have to compute the residual. return stepForward( new ElementToken(new ElementExp[]{sa.owner}), errRef ); } if( child instanceof ComplexAcceptor ) { ComplexAcceptor ca = (ComplexAcceptor)child; return stepForward( new ElementToken( (errRef!=null)? ca.owners: // in error recovery mode, pretend that every owner is happy. ca.getSatisfiedOwners() ), errRef); } throw new Error(); // child must be either Simple or Complex. }
public boolean stepForward( Acceptor child, StringRef errRef ) { // TODO: explicitly mention that where the error recovery should be done. if( child instanceof SimpleAcceptor ) { SimpleAcceptor sa = (SimpleAcceptor)child; if(sa.continuation!=null) // if the continuation is available, // the stepForward will be very fast. return stepForwardByContinuation( sa.continuation, errRef ); else // otherwise we have to compute the residual. return stepForward( new ElementToken(new ElementExp[]{sa.owner}), errRef ); } if( child instanceof ComplexAcceptor ) { ComplexAcceptor ca = (ComplexAcceptor)child; return stepForward( new ElementToken( (errRef!=null)? ca.owners: // in error recovery mode, pretend that every owner is happy. ca.getSatisfiedOwners() ), errRef); } throw new Error(); // child must be either Simple or Complex. }
public boolean stepForward( Acceptor child, StringRef errRef ) { // TODO: explicitly mention that where the error recovery should be done. if( child instanceof SimpleAcceptor ) { SimpleAcceptor sa = (SimpleAcceptor)child; if(sa.continuation!=null) // if the continuation is available, // the stepForward will be very fast. return stepForwardByContinuation( sa.continuation, errRef ); else // otherwise we have to compute the residual. return stepForward( new ElementToken(new ElementExp[]{sa.owner}), errRef ); } if( child instanceof ComplexAcceptor ) { ComplexAcceptor ca = (ComplexAcceptor)child; return stepForward( new ElementToken( (errRef!=null)? ca.owners: // in error recovery mode, pretend that every owner is happy. ca.getSatisfiedOwners() ), errRef); } throw new Error(); // child must be either Simple or Complex. }
public boolean stepForward( Acceptor child, StringRef errRef ) { // TODO: explicitly mention that where the error recovery should be done. if( child instanceof SimpleAcceptor ) { SimpleAcceptor sa = (SimpleAcceptor)child; if(sa.continuation!=null) // if the continuation is available, // the stepForward will be very fast. return stepForwardByContinuation( sa.continuation, errRef ); else // otherwise we have to compute the residual. return stepForward( new ElementToken(new ElementExp[]{sa.owner}), errRef ); } if( child instanceof ComplexAcceptor ) { ComplexAcceptor ca = (ComplexAcceptor)child; return stepForward( new ElementToken( (errRef!=null)? ca.owners: // in error recovery mode, pretend that every owner is happy. ca.getSatisfiedOwners() ), errRef); } throw new Error(); // child must be either Simple or Complex. }