xpath.jjt

来自「jsr170接口的java实现。是个apache的开源项目。」· JJT 代码 · 共 2,736 行 · 第 1/5 页

JJT
2,736
字号
		       jjtThis.processToken((Token)binaryTokenStack.pop());         }         catch(java.util.EmptyStackException e)         {           token_source.printLinePos();           e.printStackTrace();           throw e;         }		}		 #IntersectExceptExpr(2))*}void InstanceofExpr() #InstanceofExpr(> 1) :{}{  TreatExpr() (<Instanceof> SequenceType())?}void TreatExpr() #TreatExpr(> 1) :{}{  CastableExpr() (<TreatAs> SequenceType())?}void CastableExpr() #CastableExpr(> 1) :{}{  CastExpr() (<Castable> SingleType())?}void CastExpr() #CastExpr(> 1) :{}{  UnaryExpr() (<CastAs>{jjtThis.processToken(token);} #CastAs(true) SingleType())?}void UnaryExpr() #UnaryExpr(keepUnary) :{boolean keepUnary=false;}{  (<UnaryMinus>{keepUnary=true;jjtThis.processToken(token);} #UnaryMinus(true) | <UnaryPlus>{keepUnary=true;jjtThis.processToken(token);} #UnaryPlus(true))* ValueExpr()}void ValueExpr() #void :{}{  (ValidateExpr() | PathExpr())}void GeneralComp()  #void :{}{  (<Equals>                 {binaryTokenStack.push(token);}			 | <NotEquals>                 {binaryTokenStack.push(token);}			 | <Lt>                 {binaryTokenStack.push(token);}			 | <LtEquals>                 {binaryTokenStack.push(token);}			 | <Gt>                 {binaryTokenStack.push(token);}			 | <GtEquals>                 {binaryTokenStack.push(token);}			)}void ValueComp()  #void :{}{  (<FortranEq>                 {binaryTokenStack.push(token);}			 | <FortranNe>                 {binaryTokenStack.push(token);}			 | <FortranLt>                 {binaryTokenStack.push(token);}			 | <FortranLe>                 {binaryTokenStack.push(token);}			 | <FortranGt>                 {binaryTokenStack.push(token);}			 | <FortranGe>                 {binaryTokenStack.push(token);}			)}void NodeComp()  #void :{}{  (<Is>                 {binaryTokenStack.push(token);}			 | <LtLt>                 {binaryTokenStack.push(token);}			 | <GtGt>                 {binaryTokenStack.push(token);}			)}void ValidateExpr()  :{}{  (<ValidateLbrace>{jjtThis.processToken(token);} #ValidateLbrace(true) | (<ValidateSchemaMode>{jjtThis.processToken(token);} #ValidateSchemaMode(true) <LbraceExprEnclosure>{jjtThis.processToken(token);} #LbraceExprEnclosure(true))) Expr() <Rbrace>{jjtThis.processToken(token);} #Rbrace(true)}void PathExpr()  #PathExpr(>0) :{}{  ((<Root>{jjtThis.processToken(token);} #Root(true) [RelativePathExpr()]) | (<RootDescendants>{jjtThis.processToken(token);} #RootDescendants(true) RelativePathExpr()) | RelativePathExpr())}void RelativePathExpr()  #void :{}{  StepExpr() ((<Slash> | <SlashSlash>{jjtThis.processToken(token);} #SlashSlash(true)) StepExpr())*}void StepExpr()  #StepExpr(>1 || isStep) :{boolean savedIsStep = isStep; isStep=false;}{  ({isStep=true;}AxisStep(){isStep = savedIsStep;} | FilterExpr(){isStep = savedIsStep;})}void AxisStep()  #void :{}{  (ForwardStep() | ReverseStep()) PredicateList()}void ForwardStep()  #void :{}{  ((ForwardAxis() NodeTest()) | AbbrevForwardStep())}void ForwardAxis()  #void :{}{  (<AxisChild>{jjtThis.processToken(token);} #AxisChild(true) | <AxisDescendant>{jjtThis.processToken(token);} #AxisDescendant(true) | <AxisAttribute>{jjtThis.processToken(token);} #AxisAttribute(true) | <AxisSelf>{jjtThis.processToken(token);} #AxisSelf(true) | <AxisDescendantOrSelf>{jjtThis.processToken(token);} #AxisDescendantOrSelf(true) | <AxisFollowingSibling>{jjtThis.processToken(token);} #AxisFollowingSibling(true) | <AxisFollowing>{jjtThis.processToken(token);} #AxisFollowing(true))}void AbbrevForwardStep()  #void :{}{  [<At>{jjtThis.processToken(token);} #At(true)] NodeTest()}void ReverseStep()  #void :{}{  ((ReverseAxis() NodeTest()) | AbbrevReverseStep())}void ReverseAxis()  #void :{}{  (<AxisParent>{jjtThis.processToken(token);} #AxisParent(true) | <AxisAncestor>{jjtThis.processToken(token);} #AxisAncestor(true) | <AxisPrecedingSibling>{jjtThis.processToken(token);} #AxisPrecedingSibling(true) | <AxisPreceding>{jjtThis.processToken(token);} #AxisPreceding(true) | <AxisAncestorOrSelf>{jjtThis.processToken(token);} #AxisAncestorOrSelf(true))}void AbbrevReverseStep()  #void :{}{  <DotDot>{jjtThis.processToken(token);} #DotDot(true)}void NodeTest()  :{}{  (KindTest() | NameTest())}void NameTest()  :{}{  (<QName>{jjtThis.processToken(token);} #QName(true) | Wildcard())}void Wildcard()  #void :{}{  (<Star>{jjtThis.processToken(token);} #Star(true) | <NCNameColonStar>{jjtThis.processToken(token);} #NCNameColonStar(true) | <StarColonNCName>{jjtThis.processToken(token);} #StarColonNCName(true))}void FilterExpr()  #void :{}{  PrimaryExpr() PredicateList()}void PredicateList()  #PredicateList(> 0) :{}{  (Predicate())*}void Predicate()  #Predicate(> 0) :{}{  <Lbrack> Expr() <Rbrack>}void PrimaryExpr()  #void :{}{  (Literal() | VarRef() | ParenthesizedExpr() | {isStep=true;}ContextItemExpr() | FunctionCall() | Constructor() | OrderedExpr() | UnorderedExpr())}void Literal()  #void :{}{  (NumericLiteral() | <StringLiteral>{jjtThis.processToken(token);} #StringLiteral(true))}void NumericLiteral()  #void :{}{  (<IntegerLiteral>{jjtThis.processToken(token);} #IntegerLiteral(true) | <DecimalLiteral>{jjtThis.processToken(token);} #DecimalLiteral(true) | <DoubleLiteral>{jjtThis.processToken(token);} #DoubleLiteral(true))}void VarRef()  #void :{}{  <VariableIndicator> <VarName>{jjtThis.processToken(token);} #VarName(true)}void ParenthesizedExpr()  #void :{}{  <Lpar> [Expr()] <Rpar>}void ContextItemExpr()  #void :{}{  <Dot>{jjtThis.processToken(token);} #Dot(true)}void OrderedExpr()  #void :{}{  <OrderedOpen>{jjtThis.processToken(token);} #OrderedOpen(true) Expr() <Rbrace>{jjtThis.processToken(token);} #Rbrace(true)}void UnorderedExpr()  #void :{}{  <UnorderedOpen>{jjtThis.processToken(token);} #UnorderedOpen(true) Expr() <Rbrace>{jjtThis.processToken(token);} #Rbrace(true)}void FunctionCall()  :{}{  (<QNameLpar>{jjtThis.processToken(token);} #QNameLpar(true)) [ExprSingle() (<Comma> ExprSingle())*] <Rpar>}void Constructor()  :{}{  (DirectConstructor() | ComputedConstructor())}void DirectConstructor()  :{}{  (DirElemConstructor() | DirCommentConstructor() | DirPIConstructor())}void DirElemConstructor()  :{}{  (<StartTagOpenRoot>{jjtThis.processToken(token);} #StartTagOpenRoot(true) | <StartTagOpen>{jjtThis.processToken(token);} #StartTagOpen(true)) <TagQName>{jjtThis.processToken(token);} #TagQName(true) DirAttributeList() (<EmptyTagClose>{jjtThis.processToken(token);} #EmptyTagClose(true) | (<StartTagClose>{jjtThis.processToken(token);} #StartTagClose(true) (DirElemContent())* <EndTagOpen>{jjtThis.processToken(token);} #EndTagOpen(true) <TagQName>{jjtThis.processToken(token);} #TagQName(true) [<S>{jjtThis.processToken(token);} #S(true)] <EndTagClose>{jjtThis.processToken(token);} #EndTagClose(true)))}void DirAttributeList()  :{}{  (<S>{jjtThis.processToken(token);} #S(true) [<TagQName>{jjtThis.processToken(token);} #TagQName(true) [<S>{jjtThis.processToken(token);} #S(true)] <ValueIndicator>{jjtThis.processToken(token);} #ValueIndicator(true) [<S>{jjtThis.processToken(token);} #S(true)] DirAttributeValue()])*}void DirAttributeValue()  :{}{  ((<OpenQuot>{jjtThis.processToken(token);} #OpenQuot(true) ((<EscapeQuot>{jjtThis.processToken(token);} #EscapeQuot(true) | QuotAttrValueContent()))* <CloseQuot>{jjtThis.processToken(token);} #CloseQuot(true)) | (<OpenApos>{jjtThis.processToken(token);} #OpenApos(true) ((<EscapeApos>{jjtThis.processToken(token);} #EscapeApos(true) | AposAttrValueContent()))* <CloseApos>{jjtThis.processToken(token);} #CloseApos(true)))}void QuotAttrValueContent()  :{}{  (<QuotAttrContentChar>{jjtThis.processToken(token);} #QuotAttrContentChar(true) | CommonContent())}void AposAttrValueContent()  :{}{  (<AposAttrContentChar>{jjtThis.processToken(token);} #AposAttrContentChar(true) | CommonContent())}void DirElemContent()  :{}{  (DirectConstructor() | <ElementContentChar>{jjtThis.processToken(token);} #ElementContentChar(true) | CDataSection() | CommonContent())}void CommonContent()  :{}{  (<PredefinedEntityRef>{jjtThis.processToken(token);} #PredefinedEntityRef(true) | <CharRef>{jjtThis.processToken(token);} #CharRef(true) | <LCurlyBraceEscape>{jjtThis.processToken(token);} #LCurlyBraceEscape(true) | <RCurlyBraceEscape>{jjtThis.processToken(token);} #RCurlyBraceEscape(true) | EnclosedExpr())}void DirCommentConstructor()  :{}{  (<XmlCommentStartForElementContent>{jjtThis.processToken(token);} #XmlCommentStartForElementContent(true) | <XmlCommentStart>{jjtThis.processToken(token);} #XmlCommentStart(true)) DirCommentContents() <XmlCommentEnd>{jjtThis.processToken(token);} #XmlCommentEnd(true)}void DirCommentContents()  :{}{  ((<CommentContentChar>{jjtThis.processToken(token);} #CommentContentChar(true) | <CommentContentCharDash>{jjtThis.processToken(token);} #CommentContentCharDash(true)))*}void DirPIConstructor()  :{}{  (<ProcessingInstructionStartForElementContent>{jjtThis.processToken(token);} #ProcessingInstructionStartForElementContent(true) | <ProcessingInstructionStart>{jjtThis.processToken(token);} #ProcessingInstructionStart(true)) <PITarget>{jjtThis.processToken(token);} #PITarget(true) [<SForPI>{jjtThis.processToken(token);} #SForPI(true) DirPIContents()] <ProcessingInstructionEnd>{jjtThis.processToken(token);} #ProcessingInstructionEnd(true)}void DirPIContents()  :{}{  (<PIContentChar>{jjtThis.processToken(token);} #PIContentChar(true))*}void CDataSection()  :{}{  (<CdataSectionStartForElementContent>{jjtThis.processToken(token);} #CdataSectionStartForElementContent(true) | <CdataSectionStart>{jjtThis.processToken(token);} #CdataSectionStart(true)) CDataSectionContents() <CdataSectionEnd>{jjtThis.processToken(token);} #CdataSectionEnd(true)}void CDataSectionContents()  :{}{  (<CDataSectionChar>{jjtThis.processToken(token);} #CDataSectionChar(true))*}void ComputedConstructor()  :{}{  (CompDocConstructor() | CompElemConstructor() | CompAttrConstructor() | CompTextConstructor() | CompCommentConstructor() | CompPIConstructor())}void CompDocConstructor()  :{}{  <DocumentLbrace>{jjtThis.processToken(token);} #DocumentLbrace(true) Expr() <Rbrace>{jjtThis.processToken(token);} #Rbrace(true)}void CompElemConstructor()  :{}{  (<ElementQNameLbrace>{jjtThis.processToken(token);} #ElementQNameLbrace(true) | (<ElementLbrace>{jjtThis.processToken(token);} #ElementLbrace(true) Expr() <Rbrace>{jjtThis.processToken(token);} #Rbrace(true) <LbraceExprEnclosure>{jjtThis.processToken(token);} #LbraceExprEnclosure(true))) [ContentExpr()] <Rbrace>{jjtThis.processToken(token);} #Rbrace(true)}void ContentExpr()  :{}{  Expr()}void CompAttrConstructor()  :{}{  (<AttributeQNameLbrace>{jjtThis.processToken(token);} #AttributeQNameLbrace(true) | (<AttributeLbrace>{jjtThis.processToken(token);} #AttributeLbrace(true) Expr() <Rbrace>{jjtThis.processToken(token);} #Rbrace(true) <LbraceExprEnclosure>{jjtThis.processToken(token);} #LbraceExprEnclosure(true))) [Expr()] <Rbrace>{jjtThis.processToken(token);} #Rbrace(true)}void CompTextConstructor()  :{}{  <TextLbrace>{jjtThis.processToken(token);} #TextLbrace(true) Expr() <Rbrace>{jjtThis.processToken(token);} #Rbrace(true)}void CompCommentConstructor()  :{}{  <CommentLbrace>{jjtThis.processToken(token);} #CommentLbrace(true) Expr() <Rbrace>{jjtThis.processToken(token);} #Rbrace(true)}void CompPIConstructor()  :{}{  (<PINCNameLbrace>{jjtThis.processToken(token);} #PINCNameLbrace(true) | (<PILbrace>{jjtThis.processToken(token);} #PILbrace(true) Expr() <Rbrace>{jjtThis.processToken(token);} #Rbrace(true) <LbraceExprEnclosure>{jjtThis.processToken(token);} #LbraceExprEnclosure(true))) [Expr()] <Rbrace>{jjtThis.processToken(token);} #Rbrace(true)}void SingleType()  :{}{  AtomicType() [<OccurrenceZeroOrOne>{jjtThis.processToken(token);} #OccurrenceZeroOrOne(true)]}void TypeDeclaration()  :{}{  <As>{jjtThis.processToken(token);} #As(true) SequenceType()}void SequenceType()  :{}{  ((ItemType() [OccurrenceIndicator()]) | <EmptyTok>{jjtThis.processToken(token);} #EmptyTok(true))}void OccurrenceIndicator()  #void :{}{  (<OccurrenceZeroOrOne>{jjtThis.processToken(token);} #OccurrenceZeroOrOne(true) | <OccurrenceZeroOrMore>{jjtThis.processToken(token);} #OccurrenceZeroOrMore(true) | <OccurrenceOneOrMore>{jjtThis.processToken(token);} #OccurrenceOneOrMore(true))}void ItemType()  #void :{}{  (AtomicType() | KindTest() | <Item>{jjtThis.processToken(token);} #Item(true))}void AtomicType()  :{}{  (<QNameForAtomicType>{jjtThis.processToken(token);} #QNameForAtomicType(true) | <QNameForSequenceType>{jjtThis.processToken(token);} #QNameForSequenceType(true))}void KindTest()  #void :{}{  (DocumentTest() | ElementTest() | AttributeTest() | SchemaElementTest() | SchemaAttributeTest() | PITest() | CommentTest() | TextTest() | AnyKindTest())}void AnyKindTest()  :{}{  (<NodeLpar> | <NodeLparForKindTest>{jjtThis.processToken(token);} #NodeLparForKindTest(true)) <RparForKindTest>}void DocumentTest()  :{}{  (<DocumentLpar>{jjtThis.processToken(token);} #DocumentLpar(true) | <DocumentLparForKindTest>{jjtThis.processToken(token);} #DocumentLparForKindTest(true)) [(ElementTest() | SchemaElementTest())] <RparForKindTest>}void TextTest()  :{}{  (<TextLpar> | <TextLparForKindTest>{jjtThis.processToken(token);} #TextLparForKindTest(true)) <RparForKindTest>}void CommentTest()  :{}{  (<CommentLpar> | <CommentLparForKindTest>{jjtThis.processToken(token);} #CommentLparForKindTest(true)) <RparForKindTest>}void PITest()  :{}{  (<ProcessingInstructionLpar> | <ProcessingInstructionLparForKindTest>{jjtThis.processToken(token);} #ProcessingInstructionLparForKindTest(true)) [(<NCNameForPI>{jjtThis.processToken(token);} #NCNameForPI(true) | <StringLiteralForKindTest>{jjtThis.processToken(token);} #StringLiteralForKindTest(true))] <RparForKindTest>}void AttributeTest()  :{}{  (<AttributeType>{jjtThis.processToken(token);} #AttributeType(true) | <AttributeTypeForKindTest>{jjtThis.processToken(token);} #AttributeTypeForKindTest(true)) [(AttribNameOrWildcard() [<CommaForKindTest>{jjtThis.processToken(token);} #CommaForKindTest(true) TypeName()])] <RparForKindTest>}void AttribNameOrWildcard()  :{}{  (AttributeName() | <AnyName>{jjtThis.processToken(token);} #AnyName(true))}void SchemaAttributeTest()  :{}{  (<SchemaAttributeType>{jjtThis.processToken(token);} #SchemaAttributeType(true) | <SchemaAttributeTypeForKindTest>{jjtThis.processToken(token);} #SchemaAttributeTypeForKindTest(true)) AttributeDeclaration() <RparForKindTest>}void AttributeDeclaration()  :{}{  AttributeName()}void ElementTest()  :{}{  (<ElementType>{jjtThis.processToken(token);} #ElementType(true) | <ElementTypeForKindTest>{jjtThis.processToken(token);} #ElementTypeForKindTest(true) | <ElementTypeForDocumentTest>{jjtThis.processToken(token);} #ElementTypeForDocumentTest(true)) [(ElementNameOrWildcard() [<CommaForKindTest>{jjtThis.processToken(token);} #CommaForKindTest(true) TypeName() [<Nillable>{jjtThis.processToken(token);} #Nillable(true)]])] <RparForKindTest>}void ElementNameOrWildcard()  :{}{  (ElementName() | <AnyName>{jjtThis.processToken(token);} #AnyName(true))}void SchemaElementTest()  :{}{  (<SchemaElementType>{jjtThis.processToken(token);} #SchemaElementType(true) | <SchemaElementTypeForKindTest>{jjtThis.processToken(token);} #SchemaElementTypeForKindTest(true) | <SchemaElementTypeForDocumentTest>{jjtThis.processToken(token);} #SchemaElementTypeForDocumentTest(true)) ElementDeclaration() <RparForKindTest>}void ElementDeclaration()  :{}{  ElementName()}void AttributeName()  :{}{  <QNameForItemType>{jjtThis.processToken(token);} #QNameForItemType(true)}void ElementName()  :{}{  <QNameForItemType>{jjtThis.processToken(token);} #QNameForItemType(true)}void TypeName()  :{}{  <QNameForItemType>{jjtThis.processToken(token);} #QNameForItemType(true)}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?