Changeset 237

Show
Ignore:
Timestamp:
08/11/06 16:28:24 (2 years ago)
Author:
pragma
Message:

Minor changes to fix bugs with comments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/enki/EnkiParser.d

    r236 r237  
    4343     
    4444WS 
    45     ::= ws| SlashSlashComment| SlashStarComment
     45    ::= ws [ ( SlashSlashComment | SlashStarComment) ws]
    4646 
    4747    */ 
     
    5454        {//Expression 
    5555            uint start2 = position; 
    56             if((parse_ws().success) || (parse_SlashSlashComment().success) || (parse_SlashStarComment().success)){ 
    57                 clearErrors(); 
    58                 goto match1; 
    59             }else{ 
    60                 setError("Expected Whitespace, SlashSlashComment or SlashStarComment."); 
    61                 position = start2; 
    62                 goto mismatch2; 
    63             } 
     56            if(!(parse_ws().success)){ 
     57                goto mismatch4; 
     58            } 
     59            {//OptionalExpr 
     60                {//Expression 
     61                    uint start4 = position; 
     62                    {//Expression 
     63                        uint start5 = position; 
     64                        if((parse_SlashSlashComment().success) || (parse_SlashStarComment().success)){ 
     65                            clearErrors(); 
     66                        }else{ 
     67                            setError("Expected SlashSlashComment or SlashStarComment."); 
     68                            position = start5; 
     69                            goto mismatch6; 
     70                        } 
     71                    } 
     72                    if(!(parse_ws().success)){ 
     73                        goto mismatch6; 
     74                    } 
     75                    goto match5; 
     76                mismatch6: 
     77                    {/*do nothing*/} 
     78                    position = start4; 
     79                    {/*do nothing*/} 
     80                match5: 
     81                    clearErrors(); 
     82                    {/*do nothing*/} 
     83                } 
     84            } 
     85            goto match3; 
     86        mismatch4: 
     87            setError("Expected Whitespace."); 
     88            position = start2; 
     89            goto mismatch2; 
     90        match3: 
     91            clearErrors(); 
     92            goto match1; 
    6493        } 
    6594    match1: 
     
    75104Syntax 
    76105    = void createSyntax(SyntaxLine[] lines) 
    77     ::= WS { ( Rule:~lines | Comment:~lines | Directive:~lines )  WS} eoi; 
     106    ::= WS { ( Rule:~lines | Comment:~lines | Directive:~lines) WS}eoi; 
    78107 
    79108    */ 
    80109    public ResultT!(String) parse_Syntax(){ 
    81110        debug writefln("parse_Syntax()"); 
    82         uint start3 = position; 
     111        uint start6 = position; 
    83112        SyntaxLine[] bind_lines; 
    84113         
    85114         
    86115        {//Expression 
    87             uint start4 = position; 
    88             if(!(parse_WS().success)){ 
    89                 goto mismatch6
     116            uint start7 = position; 
     117            if(!(parse_WS().success)){ 
     118                goto mismatch10
    90119            } 
    91120            {//ZeroOrMoreExpr 
    92                 uint start5 = position; 
     121                uint start8 = position; 
    93122                uint termPos; 
    94             loop7
     123            loop11
    95124                termPos = position; 
    96125                if(parse_eoi().success){ 
    97                     goto loopend8
    98                 } 
    99                 {//Expression 
    100                     uint start6 = position; 
     126                    goto loopend12
     127                } 
     128                {//Expression 
     129                    uint start9 = position; 
    101130                    {//Expression 
    102                         uint start7 = position; 
     131                        uint start10 = position; 
    103132                        if((parse_Rule().assignCat!(SyntaxLine[])(bind_lines)) || (parse_Comment().assignCat!(SyntaxLine[])(bind_lines)) || (parse_Directive().assignCat!(SyntaxLine[])(bind_lines))){ 
    104133                            clearErrors(); 
    105134                        }else{ 
    106135                            setError("Expected Rule, Comment or Directive."); 
    107                             position = start7
    108                             goto mismatch10
     136                            position = start10
     137                            goto mismatch14
    109138                        } 
    110139                    } 
    111140                    if(!(parse_WS().success)){ 
    112                         goto mismatch10
    113                     } 
    114                     goto match9
    115                 mismatch10
     141                        goto mismatch14
     142                    } 
     143                    goto match13
     144                mismatch14
    116145                    {/*do nothing*/} 
    117                     position = start6
    118                     goto mismatch6
    119                 match9
     146                    position = start9
     147                    goto mismatch10
     148                match13
    120149                    clearErrors(); 
    121                     goto loop7
    122                 } 
    123             loopend8
     150                    goto loop11
     151                } 
     152            loopend12
    124153                {/*do nothing*/} 
    125154            } 
    126             goto match5
    127         mismatch6
     155            goto match9
     156        mismatch10
    128157            setError("Expected WS."); 
    129             position = start4
    130             goto mismatch4
    131         match5
    132             clearErrors(); 
    133             goto match3
    134         } 
    135     match3
     158            position = start7
     159            goto mismatch8
     160        match9
     161            clearErrors(); 
     162            goto match7
     163        } 
     164    match7
    136165        debug writefln("parse_Syntax() PASS"); 
    137166        createSyntax(bind_lines); 
    138         return ResultT!(String)(sliceData(start3,position)); 
    139     mismatch4
    140         position = start3
     167        return ResultT!(String)(sliceData(start6,position)); 
     168    mismatch8
     169        position = start6
    141170        return ResultT!(String)(); 
    142171    } 
     
    146175Rule 
    147176    = new Rule(String name,RulePredicate pred,Expression expr,RuleDecl decl) 
    148     ::= WS Identifier:name  WS [ RuleDecl:decl  WS]  [ RulePredicate:pred ]  WS "::=" WS Expression:expr WS ";"; 
     177    ::= WS Identifier:name WS [ RuleDecl:decl WS] [ RulePredicate:pred] WS "::=" WS Expression:expr WS ";"; 
    149178 
    150179    */ 
    151180    public ResultT!(Rule) parse_Rule(){ 
    152181        debug writefln("parse_Rule()"); 
    153         uint start8 = position; 
     182        uint start11 = position; 
    154183        String bind_name; 
    155184        RulePredicate bind_pred; 
     
    159188         
    160189        {//Expression 
    161             uint start9 = position; 
    162             if(!(parse_WS().success)){ 
    163                 goto mismatch14
     190            uint start12 = position; 
     191            if(!(parse_WS().success)){ 
     192                goto mismatch18
    164193            } 
    165194            if(!(parse_Identifier().assign!(String)(bind_name))){ 
    166                 goto mismatch14
    167             } 
    168             if(!(parse_WS().success)){ 
    169                 goto mismatch14
     195                goto mismatch18
     196            } 
     197            if(!(parse_WS().success)){ 
     198                goto mismatch18
    170199            } 
    171200            {//OptionalExpr 
    172201                {//Expression 
    173                     uint start11 = position; 
     202                    uint start14 = position; 
    174203                    if((parse_RuleDecl().assign!(RuleDecl)(bind_decl) && parse_WS().success)){ 
    175204                        clearErrors(); 
    176205                    }else{ 
    177                         position = start11
     206                        position = start14
    178207                    } 
    179208                } 
     
    181210            {//OptionalExpr 
    182211                {//Expression 
    183                     uint start13 = position; 
     212                    uint start16 = position; 
    184213                    if((parse_RulePredicate().assign!(RulePredicate)(bind_pred))){ 
    185214                        clearErrors(); 
    186215                    }else{ 
    187                         position = start13
    188                     } 
    189                 } 
    190             } 
    191             if(!(parse_WS().success)){ 
    192                 goto mismatch14
     216                        position = start16
     217                    } 
     218                } 
     219            } 
     220            if(!(parse_WS().success)){ 
     221                goto mismatch18
    193222            } 
    194223            if(!(terminal("::=").success)){ 
    195                 goto mismatch14
    196             } 
    197             if(!(parse_WS().success)){ 
    198                 goto mismatch14
     224                goto mismatch18
     225            } 
     226            if(!(parse_WS().success)){ 
     227                goto mismatch18
    199228            } 
    200229            if(!(parse_Expression().assign!(Expression)(bind_expr))){ 
    201                 goto mismatch14
    202             } 
    203             if(!(parse_WS().success)){ 
    204                 goto mismatch14
     230                goto mismatch18
     231            } 
     232            if(!(parse_WS().success)){ 
     233                goto mismatch18
    205234            } 
    206235            if(!(terminal(";").success)){ 
    207                 goto mismatch14
    208             } 
    209             goto match13
    210         mismatch14
     236                goto mismatch18
     237            } 
     238            goto match17
     239        mismatch18
    211240            setError("Expected WS."); 
    212             position = start9
    213             goto mismatch12
    214         match13
    215             clearErrors(); 
    216             goto match11
    217         } 
    218     match11
     241            position = start12
     242            goto mismatch16
     243        match17
     244            clearErrors(); 
     245            goto match15
     246        } 
     247    match15
    219248        debug writefln("parse_Rule() PASS"); 
    220249        ResultT!(Rule) passed = ResultT!(Rule)(new Rule(bind_name,bind_pred,bind_expr,bind_decl)); 
    221250        return passed; 
    222     mismatch12
    223         position = start8
     251    mismatch16
     252        position = start11
    224253        ResultT!(Rule) failed = ResultT!(Rule)(); 
    225254        return failed; 
     
    230259RuleDecl 
    231260    = new RuleDecl(Param[] params) 
    232     ::= ParamsExpr:params
     261    ::= ParamsExpr:params
    233262 
    234263    */ 
    235264    public ResultT!(RuleDecl) parse_RuleDecl(){ 
    236265        debug writefln("parse_RuleDecl()"); 
    237         uint start14 = position; 
     266        uint start17 = position; 
    238267        Param[] bind_params; 
    239268         
    240269         
    241270        {//Expression 
    242             uint start15 = position; 
     271            uint start18 = position; 
    243272            if((parse_ParamsExpr().assign!(Param[])(bind_params))){ 
    244273                clearErrors(); 
    245                 goto match15
     274                goto match19
    246275            }else{ 
    247276                setError("Expected ParamsExpr."); 
    248                 position = start15
    249                 goto mismatch16
    250             } 
    251         } 
    252     match15
     277                position = start18
     278                goto mismatch20
     279            } 
     280        } 
     281    match19
    253282        debug writefln("parse_RuleDecl() PASS"); 
    254283        ResultT!(RuleDecl) passed = ResultT!(RuleDecl)(new RuleDecl(bind_params)); 
    255284        return passed; 
    256     mismatch16
    257         position = start14
     285    mismatch20
     286        position = start17
    258287        ResultT!(RuleDecl) failed = ResultT!(RuleDecl)(); 
    259288        return failed; 
     
    264293RulePredicate 
    265294    = RulePredicate pred 
    266     ::= "=" WS ( ClassPredicate:pred | FunctionPredicate:pred | BindingPredicate:pred )
     295    ::= "=" WS ( ClassPredicate:pred | FunctionPredicate:pred | BindingPredicate:pred)
    267296 
    268297    */ 
    269298    public ResultT!(RulePredicate) parse_RulePredicate(){ 
    270299        debug writefln("parse_RulePredicate()"); 
    271         uint start16 = position; 
     300        uint start19 = position; 
    272301        RulePredicate bind_pred; 
    273302         
    274303         
    275304        {//Expression 
    276             uint start17 = position; 
     305            uint start20 = position; 
    277306            if(!(terminal("=").success)){ 
    278                 goto mismatch20
    279             } 
    280             if(!(parse_WS().success)){ 
    281                 goto mismatch20
     307                goto mismatch24
     308            } 
     309            if(!(parse_WS().success)){ 
     310                goto mismatch24
    282311            } 
    283312            {//Expression 
    284                 uint start18 = position; 
     313                uint start21 = position; 
    285314                if((parse_ClassPredicate().assign!(RulePredicate)(bind_pred)) || (parse_FunctionPredicate().assign!(RulePredicate)(bind_pred)) || (parse_BindingPredicate().assign!(RulePredicate)(bind_pred))){ 
    286315                    clearErrors(); 
    287316                }else{ 
    288317                    setError("Expected ClassPredicate, FunctionPredicate or BindingPredicate."); 
    289                     position = start18
    290                     goto mismatch20
    291                 } 
    292             } 
    293             goto match19
    294         mismatch20
     318                    position = start21
     319                    goto mismatch24
     320                } 
     321            } 
     322            goto match23
     323        mismatch24
    295324            {/*do nothing*/} 
    296             position = start17
    297             goto mismatch18
    298         match19
    299             clearErrors(); 
    300             goto match17
    301         } 
    302     match17
     325            position = start20
     326            goto mismatch22
     327        match23
     328            clearErrors(); 
     329            goto match21
     330        } 
     331    match21
    303332        debug writefln("parse_RulePredicate() PASS"); 
    304333        return ResultT!(RulePredicate)(bind_pred); 
    305     mismatch18
    306         position = start16
     334    mismatch22
     335        position = start19
    307336        return ResultT!(RulePredicate)(); 
    308337    } 
     
    312341ClassPredicate 
    313342    = new ClassPredicate(String name,Param[] params) 
    314     ::= "new" WS Identifier:name  WS ParamsExpr:params
     343    ::= "new" WS Identifier:name WS ParamsExpr:params
    315344 
    316345    */ 
    317346    public ResultT!(ClassPredicate) parse_ClassPredicate(){ 
    318347        debug writefln("parse_ClassPredicate()"); 
    319         uint start19 = position; 
     348        uint start22 = position; 
    320349        String bind_name; 
    321350        Param[] bind_params; 
     
    323352         
    324353        {//Expression 
    325             uint start20 = position; 
     354            uint start23 = position; 
    326355            if((terminal("new").success && parse_WS().success && parse_Identifier().assign!(String)(bind_name) && parse_WS().success && parse_ParamsExpr().assign!(Param[])(bind_params))){ 
    327                 clearErrors(); 
    328                 goto match21; 
    329             }else{ 
    330                 position = start20; 
    331                 goto mismatch22; 
    332             } 
    333         } 
    334     match21: 
    335         debug writefln("parse_ClassPredicate() PASS"); 
    336         ResultT!(ClassPredicate) passed = ResultT!(ClassPredicate)(new ClassPredicate(bind_name,bind_params)); 
    337         return passed; 
    338     mismatch22: 
    339         position = start19; 
    340         ResultT!(ClassPredicate) failed = ResultT!(ClassPredicate)(); 
    341         return failed; 
    342     } 
    343  
    344     /* 
    345      
    346 FunctionPredicate 
    347     = new FunctionPredicate(Param decl,Param[] params) 
    348     ::=  ExplicitParam:decl  WS ParamsExpr:params ; 
    349  
    350     */ 
    351     public ResultT!(FunctionPredicate) parse_FunctionPredicate(){ 
    352         debug writefln("parse_FunctionPredicate()"); 
    353         uint start21 = position; 
    354         Param bind_decl; 
    355         Param[] bind_params; 
    356          
    357          
    358         {//Expression 
    359             uint start22 = position; 
    360             if((parse_ExplicitParam().assign!(Param)(bind_decl) && parse_WS().success && parse_ParamsExpr().assign!(Param[])(bind_params))){ 
    361                 clearErrors(); 
    362                 goto match23; 
    363             }else{ 
    364                 setError("Expected ExplicitParam."); 
    365                 position = start22; 
    366                 goto mismatch24; 
    367             } 
    368         } 
    369     match23: 
    370         debug writefln("parse_FunctionPredicate() PASS"); 
    371         ResultT!(FunctionPredicate) passed = ResultT!(FunctionPredicate)(new FunctionPredicate(bind_decl,bind_params)); 
    372         return passed; 
    373     mismatch24: 
    374         position = start21; 
    375         ResultT!(FunctionPredicate) failed = ResultT!(FunctionPredicate)(); 
    376         return failed; 
    377     } 
    378  
    379     /* 
    380      
    381 BindingPredicate 
    382     = new BindingPredicate(Param param) 
    383     ::=  Param:param ; 
    384  
    385     */ 
    386     public ResultT!(BindingPredicate) parse_BindingPredicate(){ 
    387         debug writefln("parse_BindingPredicate()"); 
    388         uint start23 = position; 
    389         Param bind_param; 
    390          
    391          
    392         {//Expression 
    393             uint start24 = position; 
    394             if((parse_Param().assign!(Param)(bind_param))){ 
    395356                clearErrors(); 
    396357                goto match25; 
    397358            }else{ 
     359                position = start23; 
     360                goto mismatch26; 
     361            } 
     362        } 
     363    match25: 
     364        debug writefln("parse_ClassPredicate() PASS"); 
     365        ResultT!(ClassPredicate) passed = ResultT!(ClassPredicate)(new ClassPredicate(bind_name,bind_params)); 
     366        return passed; 
     367    mismatch26: 
     368        position = start22; 
     369        ResultT!(ClassPredicate) failed = ResultT!(ClassPredicate)(); 
     370        return failed; 
     371    } 
     372 
     373    /* 
     374     
     375FunctionPredicate 
     376    = new FunctionPredicate(Param decl,Param[] params) 
     377    ::= ExplicitParam:decl WS ParamsExpr:params; 
     378 
     379    */ 
     380    public ResultT!(FunctionPredicate) parse_FunctionPredicate(){ 
     381        debug writefln("parse_FunctionPredicate()"); 
     382        uint start24 = position; 
     383        Param bind_decl; 
     384        Param[] bind_params; 
     385         
     386         
     387        {//Expression 
     388            uint start25 = position; 
     389            if((parse_ExplicitParam().assign!(Param)(bind_decl) && parse_WS().success && parse_ParamsExpr().assign!(Param[])(bind_params))){ 
     390                clearErrors(); 
     391                goto match27; 
     392            }else{ 
     393                setError("Expected ExplicitParam."); 
     394                position = start25; 
     395                goto mismatch28; 
     396            } 
     397        } 
     398    match27: 
     399        debug writefln("parse_FunctionPredicate() PASS"); 
     400        ResultT!(FunctionPredicate) passed = ResultT!(FunctionPredicate)(new FunctionPredicate(bind_decl,bind_params)); 
     401        return passed; 
     402    mismatch28: 
     403        position = start24; 
     404        ResultT!(FunctionPredicate) failed = ResultT!(FunctionPredicate)(); 
     405        return failed; 
     406    } 
     407 
     408    /* 
     409     
     410BindingPredicate 
     411    = new BindingPredicate(Param param) 
     412    ::= Param:param; 
     413 
     414    */ 
     415    public ResultT!(BindingPredicate) parse_BindingPredicate(){ 
     416        debug writefln("parse_BindingPredicate()"); 
     417        uint start26 = position; 
     418        Param bind_param; 
     419         
     420         
     421        {//Expression 
     422            uint start27 = position; 
     423            if((parse_Param().assign!(Param)(bind_param))){ 
     424                clearErrors(); 
     425                goto match29; 
     426            }else{ 
    398427                setError("Expected Param."); 
    399                 position = start24
    400                 goto mismatch26
    401             } 
    402         } 
    403     match25
     428                position = start27
     429                goto mismatch30
     430            } 
     431        } 
     432    match29
    404433        debug writefln("parse_BindingPredicate() PASS"); 
    405434        ResultT!(BindingPredicate) passed = ResultT!(BindingPredicate)(new BindingPredicate(bind_param)); 
    406435        return passed; 
    407     mismatch26
    408         position = start23
     436    mismatch30
     437        position = start26
    409438        ResultT!(BindingPredicate) failed = ResultT!(BindingPredicate)(); 
    410439        return failed; 
     
    415444ParamsExpr 
    416445    = Param[] params 
    417     ::= "(" WS [ Param:~params  WS { "," WS Param:~params  WS} ] ")"; 
     446    ::= "(" WS [ Param:~params WS { "," WS Param:~params WS}] ")"; 
    418447 
    419448    */ 
    420449    public ResultT!(Param[]) parse_ParamsExpr(){ 
    421450        debug writefln("parse_ParamsExpr()"); 
    422         uint start25 = position; 
     451        uint start28 = position; 
    423452        Param[] bind_params; 
    424453         
    425454         
    426455        {//Expression 
    427             uint start26 = position; 
     456            uint start29 = position; 
    428457            if(!(terminal("(").success)){ 
    429                 goto mismatch30
    430             } 
    431             if(!(parse_WS().success)){ 
    432                 goto mismatch30
     458                goto mismatch34
     459            } 
     460            if(!(parse_WS().success)){ 
     461                goto mismatch34
    433462            } 
    434463            {//OptionalExpr 
    435464                {//Expression 
    436                     uint start28 = position; 
     465                    uint start31 = position; 
    437466                    if(!(parse_Param().assignCat!(Param[])(bind_params))){ 
    438                         goto mismatch32
     467                        goto mismatch36
    439468                    } 
    440469                    if(!(parse_WS().success)){ 
    441                         goto mismatch32
     470                        goto mismatch36
    442471                    } 
    443472                    {//ZeroOrMoreExpr 
    444473                        uint termPos; 
    445                     loop33
     474                    loop37
    446475                        termPos = position; 
    447476                        {//Expression 
    448                             uint start30 = position; 
     477                            uint start33 = position; 
    449478                            if((terminal(",").success && parse_WS().success && parse_Param().assignCat!(Param[])(bind_params) && parse_WS().success)){ 
    450479                                clearErrors(); 
    451                                 goto loop33
     480                                goto loop37
    452481                            }else{ 
    453                                 position = start30
    454                                 goto loopend34
     482                                position = start33
     483                                goto loopend38
    455484                            } 
    456485                        } 
    457                     loopend34
     486                    loopend38
    458487                        {/*do nothing*/} 
    459488                    } 
    460                     goto match31
    461                 mismatch32
     489                    goto match35
     490                mismatch36
    462491                    {/*do nothing*/} 
    463                     position = start28
     492                    position = start31
    464493                    {/*do nothing*/} 
    465                 match31
     494                match35
    466495                    clearErrors(); 
    467496                    {/*do nothing*/} 
     
    469498            } 
    470499            if(!(terminal(")").success)){ 
    471                 goto mismatch30
    472             } 
    473             goto match29
    474         mismatch30
     500                goto mismatch34
     501            } 
     502            goto match33
     503        mismatch34
    475504            {/*do nothing*/} 
    476             position = start26
    477             goto mismatch28
    478         match29
    479             clearErrors(); 
    480             goto match27
    481         } 
    482     match27
     505            position = start29
     506            goto mismatch32
     507        match33
     508            clearErrors(); 
     509            goto match31
     510        } 
     511    match31
    483512        debug writefln("parse_ParamsExpr() PASS"); 
    484513        return ResultT!(Param[])(bind_params); 
    485     mismatch28
    486         position = start25
     514    mismatch32
     515        position = start28
    487516        return ResultT!(Param[])(); 
    488517    } 
     
    492521Param 
    493522    = Param param 
    494     ::= ExplicitParam:param | WeakParam:param
     523    ::= ExplicitParam:param | WeakParam:param
    495524 
    496525    */ 
    497526    public ResultT!(Param) parse_Param(){ 
    498527        debug writefln("parse_Param()"); 
    499         uint start31 = position; 
     528        uint start34 = position; 
    500529        Param bind_param; 
    501530         
    502531         
    503532        {//Expression 
    504             uint start32 = position; 
     533            uint start35 = position; 
    505534            if((parse_ExplicitParam().assign!(Param)(bind_param)) || (parse_WeakParam().assign!(Param)(bind_param))){ 
    506535                clearErrors(); 
    507                 goto match35
     536                goto match39
    508537            }else{ 
    509538                setError("Expected ExplicitParam or WeakParam."); 
    510                 position = start32
    511                 goto mismatch36
    512             } 
    513         } 
    514     match35
     539                position = start35
     540                goto mismatch40
     541            } 
     542        } 
     543    match39
    515544        debug writefln("parse_Param() PASS"); 
    516545        return ResultT!(Param)(bind_param); 
    517     mismatch36
    518         position = start31
     546    mismatch40
     547        position = start34
    519548        return ResultT!(Param)(); 
    520549    } 
     
    524553WeakParam 
    525554    = new Param(String name) 
    526     ::= Identifier:name
     555    ::= Identifier:name
    527556 
    528557    */ 
    529558    public ResultT!(Param) parse_WeakParam(){ 
    530559        debug writefln("parse_WeakParam()"); 
    531         uint start33 = position; 
     560        uint start36 = position; 
    532561        String bind_name; 
    533562         
    534563         
    535564        {//Expression 
    536             uint start34 = position; 
     565            uint start37 = position; 
    537566            if((parse_Identifier().assign!(String)(bind_name))){ 
    538567                clearErrors(); 
    539                 goto match37
     568                goto match41
    540569            }else{ 
    541570                setError("Expected Identifier."); 
    542                 position = start34
    543                 goto mismatch38
    544             } 
    545         } 
    546     match37
     571                position = start37
     572                goto mismatch42
     573            } 
     574        } 
     575    match41
    547576        debug writefln("parse_WeakParam() PASS"); 
    548577        ResultT!(Param) passed = ResultT!(Param)(new Param(bind_name)); 
    549578        return passed; 
    550     mismatch38
    551         position = start33
     579    mismatch42
     580        position = start36
    552581        ResultT!(Param) failed = ResultT!(Param)(); 
    553582        return failed; 
     
    558587ExplicitParam 
    559588    = new Param(bool isArray,String type,String name) 
    560     ::= Identifier:type  WS [ "[]":isArray  Brackets WS]  Identifier:name
     589    ::= Identifier:type WS [ "[]":isArray Brackets WS] Identifier:name
    561590 
    562591    */ 
    563592    public ResultT!(Param) parse_ExplicitParam(){ 
    564593        debug writefln("parse_ExplicitParam()"); 
    565         uint start35 = position; 
     594        uint start38 = position; 
    566595        bool bind_isArray; 
    567596        String bind_type; 
     
    570599         
    571600        {//Expression 
    572             uint start36 = position; 
     601            uint start39 = position; 
    573602            if(!(parse_Identifier().assign!(String)(bind_type))){ 
    574                 goto mismatch42
    575             } 
    576             if(!(parse_WS().success)){ 
    577                 goto mismatch42
     603                goto mismatch46
     604            } 
     605            if(!(parse_WS().success)){ 
     606                goto mismatch46
    578607            } 
    579608            {//OptionalExpr 
    580609                {//Expression 
    581                     uint start38 = position; 
     610                    uint start41 = position; 
    582611                    if((terminal("[]").assign!(bool)(bind_isArray) && parse_Brackets().success && parse_WS().success)){ 
    583612                        clearErrors(); 
    584613                    }else{ 
    585                         position = start38
     614                        position = start41
    586615                    } 
    587616                } 
    588617            } 
    589618            if(!(parse_Identifier().assign!(String)(bind_name))){ 
    590                 goto mismatch42
    591             } 
    592             goto match41
    593         mismatch42
     619                goto mismatch46
     620            } 
     621            goto match45
     622        mismatch46
    594623            setError("Expected Identifier."); 
    595             position = start36
    596             goto mismatch40
    597         match41
    598             clearErrors(); 
    599             goto match39
    600         } 
    601     match39
     624            position = start39
     625            goto mismatch44
     626        match45
     627            clearErrors(); 
     628            goto match43
     629        } 
     630    match43
    602631        debug writefln("parse_ExplicitParam() PASS"); 
    603632        ResultT!(Param) passed = ResultT!(Param)(new Param(bind_isArray,bind_type,bind_name)); 
    604633        return passed; 
    605     mismatch40
    606         position = start35
     634    mismatch44
     635        position = start38
    607636        ResultT!(Param) failed = ResultT!(Param)(); 
    608637        return failed; 
     
    612641     
    613642Brackets 
    614     ::= [ "[]" Brackets]
     643    ::= [ "[]" Brackets]
    615644 
    616645    */ 
    617646    public ResultT!(bool) parse_Brackets(){ 
    618647        debug writefln("parse_Brackets()"); 
    619         uint start39 = position; 
     648        uint start42 = position; 
    620649        //no declarations 
    621650         
    622651         
    623652        {//Expression 
    624             uint start40 = position; 
     653            uint start43 = position; 
    625654            {//OptionalExpr 
    626655                {//Expression 
    627                     uint start42 = position; 
     656                    uint start45 = position; 
    628657                    if((terminal("[]").success && parse_Brackets().success)){ 
    629658                        clearErrors(); 
    630659                    }else{ 
    631                         position = start42
    632                     } 
    633                 } 
    634             } 
    635             goto match45
    636         mismatch46
     660                        position = start45
     661                    } 
     662                } 
     663            } 
     664            goto match49
     665        mismatch50
    637666            {/*do nothing*/} 
    638             position = start40
    639             goto mismatch44
    640         match45
    641             clearErrors(); 
    642             goto match43
    643         } 
    644     match43
     667            position = start43
     668            goto mismatch48
     669        match49
     670            clearErrors(); 
     671            goto match47
     672        } 
     673    match47
    645674        debug writefln("parse_Brackets() PASS"); 
    646675        return ResultT!(bool)(true);