当前位置: 首页>>代码示例>>C#>>正文


C# XmlBContext.accept方法代码示例

本文整理汇总了C#中XmlBooster.XmlBContext.accept方法的典型用法代码示例。如果您正苦于以下问题:C# XmlBContext.accept方法的具体用法?C# XmlBContext.accept怎么用?C# XmlBContext.accept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XmlBooster.XmlBContext的用法示例。


在下文中一共展示了XmlBContext.accept方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: parse


//.........这里部分代码省略.........
            } // Case
            case 'H':
            {
            ctxt.advance();
            if (ctxt.lookAheadString("eight=")){
            indicator = 1047;
            } else {
            indicator = 1057;
            } // If
            break;
            } // Case
            case 'G':
            {
            ctxt.advance();
            if (ctxt.lookAheadString("uid=")){
            indicator = 1053;
            } else {
            indicator = 1057;
            } // If
            break;
            } // Case
            default:
            indicator = 1057;
            break;
            } // Switch
            switch (indicator) {
            case 1044: {
            // Handling attribute X
            // Also handles alien attributes with prefix X
            if (fl1044){
            ctxt.fail ("Duplicate attribute: X");
            } // If
            fl1044 = true ;
            quoteChar = ctxt.acceptQuote();
            this.setX(ctxt.fetchInteger());
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            break;
            } // End of dispatch label
            case 1045: {
            // Handling attribute Y
            // Also handles alien attributes with prefix Y
            if (fl1045){
            ctxt.fail ("Duplicate attribute: Y");
            } // If
            fl1045 = true ;
            quoteChar = ctxt.acceptQuote();
            this.setY(ctxt.fetchInteger());
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            break;
            } // End of dispatch label
            case 1046: {
            // Handling attribute Width
            // Also handles alien attributes with prefix Width
            if (fl1046){
            ctxt.fail ("Duplicate attribute: Width");
            } // If
            fl1046 = true ;
            quoteChar = ctxt.acceptQuote();
            this.setWidth(ctxt.fetchInteger());
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            break;
            } // End of dispatch label
            case 1047: {
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:67,代码来源:DataDictionary.Generated.cs

示例2: lAcceptPcDataChr

 /// <summary>Utility function which parse an entity character 
 /// as defined in the XMLBooster configuration.</summary>
 /// <param name="ctxt">the context from which the data must be parsed</param>
 static char lAcceptPcDataChr(XmlBContext ctxt)
 {
     char c = (char)0;
     int indicator=0;
     switch (ctxt.current()) {
     case 'q':
     {
     ctxt.advance();
     ctxt.acceptString ("uot;");
     indicator = 2653;
     break;
     } // Case
     case 'n':
     {
     ctxt.advance();
     ctxt.acceptString ("bsp;");
     indicator = 2652;
     break;
     } // Case
     case 'l':
     {
     ctxt.advance();
     ctxt.accept2('t',';');
     indicator = 2650;
     break;
     } // Case
     case 'g':
     {
     ctxt.advance();
     ctxt.accept2('t',';');
     indicator = 2651;
     break;
     } // Case
     case 'a':
     {
     ctxt.advance();
     switch (ctxt.current()) {
     case 'p':
     {
     ctxt.advance();
     ctxt.accept3('o','s',';');
     indicator = 2654;
     break;
     } // Case
     case 'm':
     {
     ctxt.advance();
     ctxt.accept2('p',';');
     indicator = 2649;
     break;
     } // Case
     default:
     ctxt.recoverableFail ("Other character expected (2662)");
     break;
     } // Switch
     break;
     } // Case
     case '#':
     {
     ctxt.advance();
     ctxt.accept('x');
     indicator = 2655;
     break;
     } // Case
     default:
     ctxt.recoverableFail ("Other character expected (2664)");
     break;
     } // Switch
     switch (indicator) {
     case 2649: {
     c = XMLB_AMPERSAND;
     break;
     } // End of dispatch label
     case 2650: {
     c = XMLB_LESS;
     break;
     } // End of dispatch label
     case 2651: {
     c = XMLB_GREATER;
     break;
     } // End of dispatch label
     case 2652: {
     c = XMLB_NBSP;
     break;
     } // End of dispatch label
     case 2653: {
     c = XMLB_QUOT;
     break;
     } // End of dispatch label
     case 2654: {
     c = XMLB_APOS;
     break;
     } // End of dispatch label
     case 2655: {
     c = (char) ctxt.acceptHexa();
     ctxt.accept(';');
     break;
//.........这里部分代码省略.........
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:101,代码来源:DataDictionary.Generated.cs

示例3: parseBody

        /// <remarks>This method is used by XMLBooster-generated code
        /// internally. Please refrain from using it, as it
        /// might produce unexpected results, and might change
        /// or even disappear in the future.</remarks>
        public override void parseBody(XmlBContext ctxt)
        {
            #pragma warning disable 0168, 0219
            int indicator=0;
            char quoteChar;
             string  tempStr;
            #pragma warning restore 0168, 0219
            bool fl1073;
            Variable fl1075;

            ctxt.skipWhiteSpace();
            base.parseBody(ctxt);
            ctxt.skipWhiteSpace();
            // Optional Enclosed
            if (ctxt.lookAheadOpeningTag("<SubVariables")){
            ctxt.skipWhiteSpace();
            fl1073 = true ;
            while (fl1073) { // BeginLoop
            ctxt.skipWhiteSpace();
            if (ctxt.isAlNum()){
            ctxt.skipTill ('=');
            ctxt.advance();
            ctxt.skipWhiteSpace();
            quoteChar = ctxt.acceptQuote();
            ctxt.skipTill (quoteChar);
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            } else {
            fl1073 = false ;
            } // If
            } // While
            if (ctxt.current() == '/'){
            ctxt.advance();
            ctxt.accept('>');
            } else {
            ctxt.accept('>');
            // Repeat
            ctxt.skipWhiteSpace();
            fl1075 = null;
            while(ctxt.lookAheadOpeningTag ("<Variable")) {
            fl1075 = acceptor.lAccept_Variable(ctxt, "</Variable>");
            appendSubVariables(fl1075);
            ctxt.skipWhiteSpace();
            } // -- monomorphic Loop
            // EndRepeat
            ctxt.skipWhiteSpace();
            ctxt.acceptString ("</SubVariables>");
            } // If
            } // If
            // End enclosed
            ctxt.skipWhiteSpace();
        }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:56,代码来源:DataDictionary.Generated.cs

示例4: lAccept_Poly_ReqRelated

 /// <remarks>This method is used by XMLBooster-generated code
 /// internally. Please refrain from using it, as it
 /// might produce unexpected results, and might change
 /// or even disappear in the future.</remarks>
 public static ReqRelated lAccept_Poly_ReqRelated(XmlBContext ctxt, 
                   string  endingTag)
 {
     char quoteChar;
     ReqRelated res = null;
     ctxt.skipWhiteSpace();
     ctxt.acceptString ("xsi:type=");
     quoteChar = ctxt.acceptQuote();
     switch (ctxt.current()) {
     case 'V':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("ariable")){
     ctxt.accept(quoteChar);
     res = lAccept_Variable(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'T':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("estCase")){
     ctxt.accept(quoteChar);
     res = lAccept_TestCase(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'S':
     {
     ctxt.advance();
     if (ctxt.lookAhead1('t')){
     switch (ctxt.current()) {
     case 'r':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("ucture")){
     switch (ctxt.current()) {
     case 'E':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("lement")){
     ctxt.accept(quoteChar);
     res = lAccept_StructureElement(ctxt, endingTag);
     } else {
     ctxt.accept(quoteChar);
     res = lAccept_Structure(ctxt, endingTag);
     } // If
     break;
     } // Case
     default:
     ctxt.accept(quoteChar);
     res = lAccept_Structure(ctxt, endingTag);
     break;
     } // Switch
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'a':
     {
     ctxt.advance();
     if (ctxt.lookAhead2('t','e')){
     switch (ctxt.current()) {
     case 'M':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("achine")){
     ctxt.accept(quoteChar);
     res = lAccept_StateMachine(ctxt, endingTag);
     } else {
     ctxt.accept(quoteChar);
     res = lAccept_State(ctxt, endingTag);
     } // If
     break;
     } // Case
     default:
     ctxt.accept(quoteChar);
     res = lAccept_State(ctxt, endingTag);
     break;
     } // Switch
     } else {
     res = null;
     } // If
     break;
     } // Case
     default:
     res = null;
     break;
     } // Switch
     } else {
     res = null;
//.........这里部分代码省略.........
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:101,代码来源:DataDictionary.Generated.cs

示例5: lAcceptEnum_ST_MODE


//.........这里部分代码省略.........
     res = ST_MODE.Mode_SB;
     break;
     } // Case
     default:
     ctxt.recoverableFail ("Other character expected (2424)");
     break;
     } // Switch
     break;
     } // Case
     case 'R':
     {
     ctxt.advance();
     if (ctxt.lookAhead1('E')){
     res = ST_MODE.Mode_RE;
     } else {
     ctxt.moveBack(1);
     res = ST_MODE.Mode_NA;
     } // If
     break;
     } // Case
     case 'P':
     {
     ctxt.advance();
     switch (ctxt.current()) {
     case 'T':
     {
     ctxt.advance();
     res = ST_MODE.Mode_PT;
     break;
     } // Case
     case 'S':
     {
     ctxt.advance();
     ctxt.accept('H');
     res = ST_MODE.Mode_PSH;
     break;
     } // Case
     default:
     ctxt.recoverableFail ("Other character expected (2429)");
     break;
     } // Switch
     break;
     } // Case
     case 'O':
     {
     ctxt.advance();
     if (ctxt.lookAhead1('S')){
     res = ST_MODE.Mode_OS;
     } else {
     ctxt.moveBack(1);
     res = ST_MODE.Mode_NA;
     } // If
     break;
     } // Case
     case 'N':
     {
     ctxt.advance();
     switch (ctxt.current()) {
     case 'P':
     {
     ctxt.advance();
     res = ST_MODE.Mode_NP;
     break;
     } // Case
     case 'L':
     {
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:67,代码来源:DataDictionary.Generated.cs

示例6: lAccept_Poly_Namable

 /// <remarks>This method is used by XMLBooster-generated code
 /// internally. Please refrain from using it, as it
 /// might produce unexpected results, and might change
 /// or even disappear in the future.</remarks>
 public static Namable lAccept_Poly_Namable(XmlBContext ctxt, 
                   string  endingTag)
 {
     char quoteChar;
     Namable res = null;
     ctxt.skipWhiteSpace();
     ctxt.acceptString ("xsi:type=");
     quoteChar = ctxt.acceptQuote();
     switch (ctxt.current()) {
     case 'V':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("ariable")){
     ctxt.accept(quoteChar);
     res = lAccept_Variable(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'T':
     {
     ctxt.advance();
     switch (ctxt.current()) {
     case 'r':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("anslation")){
     switch (ctxt.current()) {
     case 'D':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("ictionary")){
     ctxt.accept(quoteChar);
     res = lAccept_TranslationDictionary(ctxt, endingTag);
     } else {
     ctxt.accept(quoteChar);
     res = lAccept_Translation(ctxt, endingTag);
     } // If
     break;
     } // Case
     default:
     ctxt.accept(quoteChar);
     res = lAccept_Translation(ctxt, endingTag);
     break;
     } // Switch
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'e':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("stCase")){
     ctxt.accept(quoteChar);
     res = lAccept_TestCase(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     default:
     res = null;
     break;
     } // Switch
     break;
     } // Case
     case 'S':
     {
     ctxt.advance();
     switch (ctxt.current()) {
     case 'u':
     {
     ctxt.advance();
     if (ctxt.lookAhead2('b','S')){
     switch (ctxt.current()) {
     case 't':
     {
     ctxt.advance();
     if (ctxt.lookAhead2('e','p')){
     ctxt.accept(quoteChar);
     res = lAccept_SubStep(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'e':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("quence")){
     ctxt.accept(quoteChar);
     res = lAccept_SubSequence(ctxt, endingTag);
     } else {
     res = null;
//.........这里部分代码省略.........
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:101,代码来源:DataDictionary.Generated.cs

示例7: lAccept_Poly_Type

 /// <remarks>This method is used by XMLBooster-generated code
 /// internally. Please refrain from using it, as it
 /// might produce unexpected results, and might change
 /// or even disappear in the future.</remarks>
 public static Type lAccept_Poly_Type(XmlBContext ctxt, 
                   string  endingTag)
 {
     char quoteChar;
     Type res = null;
     ctxt.skipWhiteSpace();
     ctxt.acceptString ("xsi:type=");
     quoteChar = ctxt.acceptQuote();
     switch (ctxt.current()) {
     case 'S':
     {
     ctxt.advance();
     if (ctxt.lookAhead1('t')){
     switch (ctxt.current()) {
     case 'r':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("ucture")){
     ctxt.accept(quoteChar);
     res = lAccept_Structure(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'a':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("teMachine")){
     ctxt.accept(quoteChar);
     res = lAccept_StateMachine(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     default:
     res = null;
     break;
     } // Switch
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'R':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("ange")){
     ctxt.accept(quoteChar);
     res = lAccept_Range(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'F':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("unction")){
     ctxt.accept(quoteChar);
     res = lAccept_Function(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'E':
     {
     ctxt.advance();
     if (ctxt.lookAhead3('n','u','m')){
     ctxt.accept(quoteChar);
     res = lAccept_Enum(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     case 'C':
     {
     ctxt.advance();
     if (ctxt.lookAheadString("ollection")){
     ctxt.accept(quoteChar);
     res = lAccept_Collection(ctxt, endingTag);
     } else {
     res = null;
     } // If
     break;
     } // Case
     default:
     res = null;
     break;
     } // Switch
       return res;
 }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:99,代码来源:DataDictionary.Generated.cs


注:本文中的XmlBooster.XmlBContext.accept方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。