⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 asnparser.jj

📁 ASN.1工具源代码,包括编译源码生成工具和各种基本类型构造类型的编解码实现代码
💻 JJ
📖 第 1 页 / 共 5 页
字号:
  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/} {/*@bgen(jjtree) BuiltinType */  try {/*@egen*/   IntegerType()/*@bgen(jjtree)*/                {                  jjtree.closeNodeScope(jjtn000, true);                  jjtc000 = false;                }/*@egen*/ { jjtn000.which = 0; }| BitStringType()/*@bgen(jjtree)*/                  {                    jjtree.closeNodeScope(jjtn000, true);                    jjtc000 = false;                  }/*@egen*/ { jjtn000.which = 1; }| LOOKAHEAD(2) SetOrSequenceType()/*@bgen(jjtree)*/                                   {                                     jjtree.closeNodeScope(jjtn000, true);                                     jjtc000 = false;                                   }/*@egen*/ { jjtn000.which = 2; }| SetOrSequenceOfType()/*@bgen(jjtree)*/                       {                         jjtree.closeNodeScope(jjtn000, true);                         jjtc000 = false;                       }/*@egen*/{ jjtn000.which = 3; }| ChoiceType()/*@bgen(jjtree)*/               {                 jjtree.closeNodeScope(jjtn000, true);                 jjtc000 = false;               }/*@egen*/ { jjtn000.which = 4; }| SelectionType()/*@bgen(jjtree)*/                  {                    jjtree.closeNodeScope(jjtn000, true);                    jjtc000 = false;                  }/*@egen*/ { jjtn000.which = 5; }| TaggedType()/*@bgen(jjtree)*/               {                 jjtree.closeNodeScope(jjtn000, true);                 jjtc000 = false;               }/*@egen*/ { jjtn000.which = 6; }| AnyType()/*@bgen(jjtree)*/            {              jjtree.closeNodeScope(jjtn000, true);              jjtc000 = false;            }/*@egen*/ { jjtn000.which = 7; }| EnumeratedType()/*@bgen(jjtree)*/                   {                     jjtree.closeNodeScope(jjtn000, true);                     jjtc000 = false;                   }/*@egen*/ { jjtn000.which = 8; }| <OCTET_TKN> <STRING_TKN>/*@bgen(jjtree)*/                           {                             jjtree.closeNodeScope(jjtn000, true);                             jjtc000 = false;                           }/*@egen*/ { jjtn000.which = 9; }| <OBJECT_IDENTIFIER_TKN>/*@bgen(jjtree)*/                         {                           jjtree.closeNodeScope(jjtn000, true);                           jjtc000 = false;                         }/*@egen*/{ jjtn000.which = 10; }| <REAL_TKN>/*@bgen(jjtree)*/            {              jjtree.closeNodeScope(jjtn000, true);              jjtc000 = false;            }/*@egen*/{ jjtn000.which = 11; }| <BOOLEAN_TKN>/*@bgen(jjtree)*/               {                 jjtree.closeNodeScope(jjtn000, true);                 jjtc000 = false;               }/*@egen*/{ jjtn000.which = 12; }| <NULL_TKN>/*@bgen(jjtree)*/             {               jjtree.closeNodeScope(jjtn000, true);               jjtc000 = false;             }/*@egen*/ { jjtn000.which = 13; }/*@bgen(jjtree)*/  } catch (Throwable jjte000) {    if (jjtc000) {      jjtree.clearNodeScope(jjtn000);      jjtc000 = false;    } else {      jjtree.popNode();    }    if (jjte000 instanceof RuntimeException) {      throw (RuntimeException)jjte000;    }    if (jjte000 instanceof ParseException) {      throw (ParseException)jjte000;    }    throw (Error)jjte000;  } finally {    if (jjtc000) {      jjtree.closeNodeScope(jjtn000, true);    }  }/*@egen*/}void EnumeratedType() : {/*@bgen(jjtree) EnumeratedType */  ASTEnumeratedType jjtn000 = new ASTEnumeratedType(this, JJTENUMERATEDTYPE);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/} {/*@bgen(jjtree) EnumeratedType */   try {/*@egen*/    <ENUMERATED_TKN> <LEFTBRACE_TKN> NamedNumberList() <RIGHTBRACE_TKN>/*@bgen(jjtree)*/   } catch (Throwable jjte000) {     if (jjtc000) {       jjtree.clearNodeScope(jjtn000);       jjtc000 = false;     } else {       jjtree.popNode();     }     if (jjte000 instanceof RuntimeException) {       throw (RuntimeException)jjte000;     }     if (jjte000 instanceof ParseException) {       throw (ParseException)jjte000;     }     throw (Error)jjte000;   } finally {     if (jjtc000) {       jjtree.closeNodeScope(jjtn000, true);     }   }/*@egen*/ }void IntegerType() : {/*@bgen(jjtree) IntegerType */  ASTIntegerType jjtn000 = new ASTIntegerType(this, JJTINTEGERTYPE);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/} {/*@bgen(jjtree) IntegerType */ try {/*@egen*/  <INTEGER_TKN> [ <LEFTBRACE_TKN> { jjtn000.hasnames = true; } NamedNumberList() <RIGHTBRACE_TKN> ]/*@bgen(jjtree)*/ } catch (Throwable jjte000) {   if (jjtc000) {     jjtree.clearNodeScope(jjtn000);     jjtc000 = false;   } else {     jjtree.popNode();   }   if (jjte000 instanceof RuntimeException) {     throw (RuntimeException)jjte000;   }   if (jjte000 instanceof ParseException) {     throw (ParseException)jjte000;   }   throw (Error)jjte000; } finally {   if (jjtc000) {     jjtree.closeNodeScope(jjtn000, true);   } }/*@egen*/}void BitStringType() : {/*@bgen(jjtree) BitStringType */  ASTBitStringType jjtn000 = new ASTBitStringType(this, JJTBITSTRINGTYPE);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/} {/*@bgen(jjtree) BitStringType */  try {/*@egen*/   <BIT_TKN> <STRING_TKN> [ <LEFTBRACE_TKN> { jjtn000.hasnames = true; } NamedNumberList() <RIGHTBRACE_TKN> ]/*@bgen(jjtree)*/  } catch (Throwable jjte000) {    if (jjtc000) {      jjtree.clearNodeScope(jjtn000);      jjtc000 = false;    } else {      jjtree.popNode();    }    if (jjte000 instanceof RuntimeException) {      throw (RuntimeException)jjte000;    }    if (jjte000 instanceof ParseException) {      throw (ParseException)jjte000;    }    throw (Error)jjte000;  } finally {    if (jjtc000) {      jjtree.closeNodeScope(jjtn000, true);    }  }/*@egen*/ }void NamedNumberList() : {/*@bgen(jjtree) NamedNumberList */  ASTNamedNumberList jjtn000 = new ASTNamedNumberList(this, JJTNAMEDNUMBERLIST);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/  } {/*@bgen(jjtree) NamedNumberList */  try {/*@egen*/   NamedNumber() (<COMMA_TKN> NamedNumber())*/*@bgen(jjtree)*/  } catch (Throwable jjte000) {    if (jjtc000) {      jjtree.clearNodeScope(jjtn000);      jjtc000 = false;    } else {      jjtree.popNode();    }    if (jjte000 instanceof RuntimeException) {      throw (RuntimeException)jjte000;    }    if (jjte000 instanceof ParseException) {      throw (ParseException)jjte000;    }    throw (Error)jjte000;  } finally {    if (jjtc000) {      jjtree.closeNodeScope(jjtn000, true);    }  }/*@egen*/}void NamedNumber() : {/*@bgen(jjtree) NamedNumber */  ASTNamedNumber jjtn000 = new ASTNamedNumber(this, JJTNAMEDNUMBER);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/ } {/*@bgen(jjtree) NamedNumber */  try {/*@egen*/   identifier() <LEFTPAREN_TKN> ( SignedNumber() { jjtn000.which=1; } | DefinedValue() { jjtn000.which=2; } )                             <RIGHTPAREN_TKN>/*@bgen(jjtree)*/  } catch (Throwable jjte000) {    if (jjtc000) {      jjtree.clearNodeScope(jjtn000);      jjtc000 = false;    } else {      jjtree.popNode();    }    if (jjte000 instanceof RuntimeException) {      throw (RuntimeException)jjte000;    }    if (jjte000 instanceof ParseException) {      throw (ParseException)jjte000;    }    throw (Error)jjte000;  } finally {    if (jjtc000) {      jjtree.closeNodeScope(jjtn000, true);    }  }/*@egen*/ }void SignedNumber() : {/*@bgen(jjtree) SignedNumber */                        ASTSignedNumber jjtn000 = new ASTSignedNumber(this, JJTSIGNEDNUMBER);                        boolean jjtc000 = true;                        jjtree.openNodeScope(jjtn000);/*@egen*/ Token t; } {/*@bgen(jjtree) SignedNumber */  try {/*@egen*/   [<MINUS_TKN> {jjtn000.is_neg = true; }  ] (   t = <NUMBER_TKN>/*@bgen(jjtree)*/                                                                 {                                                                   jjtree.closeNodeScope(jjtn000, true);                                                                   jjtc000 = false;                                                                 }/*@egen*/ { jjtn000.number = t.image; }                                              | t = <NUMBER_ERANGE_TKN>/*@bgen(jjtree)*/                                                                        {                                                                          jjtree.closeNodeScope(jjtn000, true);                                                                          jjtc000 = false;                                                                        }/*@egen*/ { jjtn000.number = t.image; } )/*@bgen(jjtree)*/  } finally {    if (jjtc000) {      jjtree.closeNodeScope(jjtn000, true);    }  }/*@egen*/}void SetOrSequenceOfType() : {/*@bgen(jjtree) SetOrSequenceOfType */  ASTSetOrSequenceOfType jjtn000 = new ASTSetOrSequenceOfType(this, JJTSETORSEQUENCEOFTYPE);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/ }{/*@bgen(jjtree) SetOrSequenceOfType */   try {/*@egen*/    ( <SET_TKN> { jjtn000.which = 1; } | <SEQUENCE_TKN> { jjtn000.which = 2; } ) [[<LEFTPAREN_TKN>] { jjtn000.has_size_constraint = true; } SizeConstraint() [<RIGHTPAREN_TKN>]] <OF_TKN>     Type()/*@bgen(jjtree)*/   } catch (Throwable jjte000) {     if (jjtc000) {       jjtree.clearNodeScope(jjtn000);       jjtc000 = false;     } else {       jjtree.popNode();     }     if (jjte000 instanceof RuntimeException) {       throw (RuntimeException)jjte000;     }     if (jjte000 instanceof ParseException) {       throw (ParseException)jjte000;     }     throw (Error)jjte000;   } finally {     if (jjtc000) {       jjtree.closeNodeScope(jjtn000, true);     }   }/*@egen*/}void SetOrSequenceType() : {/*@bgen(jjtree) SetOrSequenceType */  ASTSetOrSequenceType jjtn000 = new ASTSetOrSequenceType(this, JJTSETORSEQUENCETYPE);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/ } {/*@bgen(jjtree) SetOrSequenceType */  try {/*@egen*/   (<SET_TKN> { jjtn000.which = 1; } | <SEQUENCE_TKN> { jjtn000.which = 2; } ) <LEFTBRACE_TKN> [ ElementTypeList() ] <RIGHTBRACE_TKN>/*@bgen(jjtree)*/  } catch (Throwable jjte000) {    if (jjtc000) {      jjtree.clearNodeScope(jjtn000);      jjtc000 = false;    } else {      jjtree.popNode();    }    if (jjte000 instanceof RuntimeException) {      throw (RuntimeException)jjte000;    }    if (jjte000 instanceof ParseException) {      throw (ParseException)jjte000;    }    throw (Error)jjte000;  } finally {    if (jjtc000) {      jjtree.closeNodeScope(jjtn000, true);    }  }/*@egen*/}void ChoiceType() : {/*@bgen(jjtree) ChoiceType */  ASTChoiceType jjtn000 = new ASTChoiceType(this, JJTCHOICETYPE);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/ } {/*@bgen(jjtree) ChoiceType */   try {/*@egen*/    <CHOICE_TKN> <LEFTBRACE_TKN> ElementTypeList() <RIGHTBRACE_TKN>/*@bgen(jjtree)*/   } catch (Throwable jjte000) {     if (jjtc000) {       jjtree.clearNodeScope(jjtn000);       jjtc000 = false;     } else {       jjtree.popNode();     }     if (jjte000 instanceof RuntimeException) {       throw (RuntimeException)jjte000;     }     if (jjte000 instanceof ParseException) {       throw (ParseException)jjte000;     }     throw (Error)jjte000;   } finally {     if (jjtc000) {       jjtree.closeNodeScope(jjtn000, true);     }   }/*@egen*/ }void ElementTypeList() : {/*@bgen(jjtree) ElementTypeList */  ASTElementTypeList jjtn000 = new ASTElementTypeList(this, JJTELEMENTTYPELIST);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/} {/*@bgen(jjtree) ElementTypeList */   try {/*@egen*/    ElementType() (<COMMA_TKN> ElementType())*/*@bgen(jjtree)*/   } catch (Throwable jjte000) {     if (jjtc000) {       jjtree.clearNodeScope(jjtn000);       jjtc000 = false;     } else {       jjtree.popNode();     }     if (jjte000 instanceof RuntimeException) {       throw (RuntimeException)jjte000;     }     if (jjte000 instanceof ParseException) {       throw (ParseException)jjte000;     }     throw (Error)jjte000;   } finally {     if (jjtc000) {       jjtree.closeNodeScope(jjtn000, true);     }   }/*@egen*/}void ElementType() : {/*@bgen(jjtree) ElementType */  ASTElementType jjtn000 = new ASTElementType(this, JJTELEMENTTYPE);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/ } {/*@bgen(jjtree) ElementType */  try {/*@egen*/   ( NamedType()  [ ( <OPTIONAL_TKN> ) { jjtn000.optional = true; }                    |                    ( <DEFAULT_TKN> NamedValue() ) { jjtn000.has_default = true; }                 ]   )/*@bgen(jjtree)*/    {      jjtree.closeNodeScope(jjtn000, true);      jjtc000 = false;    }/*@egen*/ { jjtn000.which = 1; }  |   ComponentsType()/*@bgen(jjtree)*/                   {                     jjtree.closeNodeScope(jjtn000, true);                     jjtc000 = false;                   }/*@egen*/ { jjtn000.which = 2; }/*@bgen(jjtree)*/  } catch (Throwable jjte000) {    if (jjtc000) {      jjtree.clearNodeScope(jjtn000);      jjtc000 = false;    } else {      jjtree.popNode();    }    if (jjte000 instanceof RuntimeException) {      throw (RuntimeException)jjte000;    }    if (jjte000 instanceof ParseException) {      throw (ParseException)jjte000;    }    throw (Error)jjte000;  } finally {    if (jjtc000) {      jjtree.closeNodeScope(jjtn000, true);    }  }/*@egen*/}void ComponentsType() : {/*@bgen(jjtree) ComponentsType */  ASTComponentsType jjtn000 = new ASTComponentsType(this, JJTCOMPONENTSTYPE);  boolean jjtc000 = true;  jjtree.openNodeScope(jjtn000);/*@egen*/  }{/*@bgen(jjtree) ComponentsType */  try {/*@egen*/  <COMPONENTS_TKN> <OF_TKN>  Type()/*@bgen(jjtree)*/  } catch (Throwable jjte000) {    if (jjtc000) {      jjtree.clearNodeScope(jjtn000);      jjtc000 = false;    } else {      jjtree.popNode();    }    if (jjte000 instanceof RuntimeException) {      throw (RuntimeException)jjte000;    }    if (jjte000 instanceof ParseException) {      throw (ParseException)jjte000;    }    throw (Error)jjte000;  } finally {    if (jjtc000) {      jjtree.closeNodeScope(jjtn000, true);    }  }/*@egen*/ 

⌨️ 快捷键说明

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