protected boolean onAttribute( AttributeToken token, StringRef refErr ) { if(!super.onAttribute(token,refErr)) return false; for( int i=0; i<contents.length; i++ ) contents[i] = docDecl.attFeeder.feed( contents[i], token, ignoreUndeclaredAttributes ); return true; }
public boolean onEndAttributes( StartTagInfo sti, StringRef refErr ) { if(!super.onEndAttributes(sti,refErr)) return false; for( int i=0; i<contents.length; i++ ) contents[i] = docDecl.attPruner.prune(contents[i]); return true; } }
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. }
/** eats string literal */ public final boolean onText2( String literal, IDContextProvider2 context, StringRef refErr, DatatypeRef refType ) { if(!super.onText2(literal,context,refErr,refType)) return false; final StringToken token = new StringToken(docDecl,literal,context); final ResidualCalculator res = docDecl.resCalc; // some may become invalid, but at least one always remain valid for( int i=0; i<contents.length; i++ ) contents[i] = res.calcResidual( contents[i], token ); return true; }
public final boolean stepForward( Acceptor child, StringRef errRef ) { if(!super.stepForward(child,errRef)) return false;
/** eats string literal */ public final boolean onText2( String literal, IDContextProvider2 context, StringRef refErr, DatatypeRef refType ) { if(!super.onText2(literal,context,refErr,refType)) return false; final StringToken token = new StringToken(docDecl,literal,context); final ResidualCalculator res = docDecl.resCalc; // some may become invalid, but at least one always remain valid for( int i=0; i<contents.length; i++ ) contents[i] = res.calcResidual( contents[i], token ); return true; }
public final boolean stepForward( Acceptor child, StringRef errRef ) { if(!super.stepForward(child,errRef)) return false;
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 onEndAttributes( StartTagInfo sti, StringRef refErr ) { if(!super.onEndAttributes(sti,refErr)) return false; for( int i=0; i<contents.length; i++ ) contents[i] = docDecl.attPruner.prune(contents[i]); return true; } }
protected boolean onAttribute( AttributeToken token, StringRef refErr ) { if(!super.onAttribute(token,refErr)) return false; for( int i=0; i<contents.length; i++ ) contents[i] = docDecl.attFeeder.feed( contents[i], token, ignoreUndeclaredAttributes ); return true; }
/** eats string literal */ public final boolean onText2( String literal, IDContextProvider2 context, StringRef refErr, DatatypeRef refType ) { if(!super.onText2(literal,context,refErr,refType)) return false; final StringToken token = new StringToken(docDecl,literal,context); final ResidualCalculator res = docDecl.resCalc; // some may become invalid, but at least one always remain valid for( int i=0; i<contents.length; i++ ) contents[i] = res.calcResidual( contents[i], token ); return true; }
public final boolean stepForward( Acceptor child, StringRef errRef ) { if(!super.stepForward(child,errRef)) return false;
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 onEndAttributes( StartTagInfo sti, StringRef refErr ) { if(!super.onEndAttributes(sti,refErr)) return false; for( int i=0; i<contents.length; i++ ) contents[i] = docDecl.attPruner.prune(contents[i]); return true; } }
protected boolean onAttribute( AttributeToken token, StringRef refErr ) { if(!super.onAttribute(token,refErr)) return false; for( int i=0; i<contents.length; i++ ) contents[i] = docDecl.attFeeder.feed( contents[i], token, ignoreUndeclaredAttributes ); return true; }
/** eats string literal */ public final boolean onText2( String literal, IDContextProvider2 context, StringRef refErr, DatatypeRef refType ) { if(!super.onText2(literal,context,refErr,refType)) return false; final StringToken token = new StringToken(docDecl,literal,context); final ResidualCalculator res = docDecl.resCalc; // some may become invalid, but at least one always remain valid for( int i=0; i<contents.length; i++ ) contents[i] = res.calcResidual( contents[i], token ); return true; }
public final boolean stepForward( Acceptor child, StringRef errRef ) { if(!super.stepForward(child,errRef)) return false;
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 onEndAttributes( StartTagInfo sti, StringRef refErr ) { if(!super.onEndAttributes(sti,refErr)) return false; for( int i=0; i<contents.length; i++ ) contents[i] = docDecl.attPruner.prune(contents[i]); return true; } }
protected boolean onAttribute( AttributeToken token, StringRef refErr ) { if(!super.onAttribute(token,refErr)) return false; for( int i=0; i<contents.length; i++ ) contents[i] = docDecl.attFeeder.feed( contents[i], token, ignoreUndeclaredAttributes ); return true; }