Changeset 10

Show
Ignore:
Timestamp:
07/07/08 18:14:06 (6 months ago)
Author:
lb
Message:

Parser Integrating the new Pragma Directives

Location:
trunk/src/xtc/lang/stats
Files:
3 added
7 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/xtc/lang/stats/Makefile

    r9 r10  
    6969        $(JAVAC) $(JAVAC_OPTIONS) StatsParser.java 
    7070 
    71         $(RATS) -option 'parser(xtc.lang.stats.StatsReader)' -option withParseTree -option verbose Stats.rats 
    72         $(JAVAC) $(JAVAC_OPTIONS) StatsReader.java 
    7371 
    7472factories : 
  • trunk/src/xtc/lang/stats/Stats.rats

    r9 r10  
    1818 */ 
    1919 
    20 /** 
    21  * A complete C grammar. 
    22  * 
    23  * @author Robert Grimm 
    24  * @version $Revision: 1.20 $ 
    25  */ 
    2620module xtc.lang.stats.Stats; 
    2721 
    2822instantiate xtc.lang.CConstant(xtc.lang.stats.StatsSpacing); 
    29 instantiate xtc.lang.CIdentifier(xtc.lang.CReserved, xtc.lang.stats.StatsSpacing); 
     23instantiate xtc.lang.CIdentifier(xtc.lang.stats.StatsReserved, xtc.lang.stats.StatsSpacing); 
    3024instantiate xtc.util.Symbol(xtc.lang.stats.StatsSpacing); 
    3125instantiate xtc.lang.CSymbol(xtc.util.Symbol); 
     26instantiate xtc.lang.stats.StatsSymbol(xtc.lang.CSymbol); 
    3227instantiate xtc.lang.stats.StatsSpacing(xtc.lang.CState); 
    3328instantiate xtc.lang.CContext(xtc.lang.CState); 
    3429 
    3530modify xtc.lang.stats.StatsCore(xtc.lang.CContext, xtc.lang.CConstant, 
    36                       xtc.lang.CIdentifier, xtc.lang.CSymbol, 
     31                      xtc.lang.CIdentifier, xtc.lang.stats.StatsSymbol, 
    3732                      xtc.lang.stats.StatsSpacing); 
    3833 
  • trunk/src/xtc/lang/stats/StatsCore.rats

    r9 r10  
    3131 import Identifier; 
    3232 import Symbol; 
    33  import xtc.lang.stats.StatsSpacing; 
     33 import Spacing; 
     34  
    3435  
    3536  
    3637 modify xtc.lang.CCore(Context, Constant, Identifier, Symbol, Spacing); 
    3738  
    38   
     39 
     40 Node ExternalDeclaration += 
     41   <PragmaExt> PragmaStatement  
     42   / <Declaration> ... 
     43   ; 
     44 
    3945 Node Statement += 
    40          <Conditional> ... 
    41    / <Pragma> PragmaStatement 
     46   <PragmaIn> PragmaStatement 
     47   / <Expression> ... 
    4248   ; 
    43   
    44   
    45 inline Node PragmaStatement =  
    46           <PIfElse>  IfElsePStatement  
    47         / <PIf>  IfPStatement 
    48         / <PIfDefElse> IfDefElsePStatement 
    49         / <PIfDef> IfDefPStatement 
    50         ; 
    51          
    5249 
    53 inline generic IfDefElsePStatement =  
    54     void:"#":Symbol Space* void:"pragma ifdef ":Keyword Expression &LineTerminator  
    55       Statement  
    56     void:"#":Symbol Space* void:"pragma else ":Keyword Space* &LineTerminator  
    57       Statement 
    58     void:"#":Symbol Space* void:"pragma endif ":Keyword Space* &LineTerminator 
    59   / void:"#":Symbol Space* void:"pragma ifdef ":Keyword Expression &LineTerminator 
    60           PragmaElif+ 
    61         void:"#":Symbol Space* void:"pragma endif ":Keyword Space* &LineTerminator 
     50generic PragmaStatement = 
     51   <PIfDef> PragmaIfDef   
     52  ; 
     53   
     54   
     55generic PragmaIfDef = 
     56  void:"#pragma":Symbol void:"ifdef":Keyword Expression LineTerminator* 
     57   Statement+ 
     58   PragmaAlternation* 
     59   EndPragmaIf 
     60  ; 
     61   
     62void EndPragmaIf =  
     63  void:"#pragma":Symbol Space* void:"endif":Keyword LineTerminator* 
     64  ; 
     65   
     66   
     67generic PragmaAlternation =  
     68  <PElse> PragmaElse 
     69  / <PElif> PragmaElIf 
     70  ; 
     71    
     72 
     73generic PragmaElse =  
     74  void:"#pragma":Symbol void:"else":Keyword LineTerminator* 
     75  Statement+ 
    6276  ; 
    6377 
    64 inline generic IfElsePStatement =  
    65     void:"#":Symbol Space* void:"pragma if ":Keyword Expression &LineTerminator 
    66       Statement 
    67     void:"#":Symbol Space* void:"pragma else ":Keyword Space* &LineTerminator  
    68       Statement 
    69     void:"#":Symbol Space* void:"pragma endif ":Keyword Space* &LineTerminator 
    70   / void:"#":Symbol Space* void:"pragma if ":Keyword Expression &LineTerminator 
    71       PragmaElif+ 
    72     void:"#":Symbol Space* void:"pragma endif ":Keyword Space* &LineTerminator 
    73   ;   
    74          
    75 inline generic PragmaElif =  
    76         void:"#":Symbol Space* void:"pragma elif ":Keyword Expression &LineTerminator 
    77           Statement 
    78         ; 
    79          
    80 inline generic IfDefPStatement =  
    81         void:"#":Symbol Space* void:"pragma ifdef ":Keyword Expression &LineTerminator  
    82           Statement 
    83         void:"#":Symbol Space* void:"pragma endif ":Keyword Space* &LineTerminator 
    84         ;  
    85  
    86  
    87 inline generic IfPStatement =  
    88         void:"#":Symbol Space* void:"pragma if ":Keyword Expression &LineTerminator  
    89           Statement 
    90         void:"#":Symbol Space* void:"pragma endif ":Keyword Space* &LineTerminator 
    91         ;  
    92    
     78generic PragmaElIf =  
     79  void:"#pragma":Symbol void:"elif":Keyword Expression LineTerminator* 
     80  Statement+ 
     81   ; 
  • trunk/src/xtc/lang/stats/StatsDriver.java

    r9 r10  
    1919package xtc.lang.stats; 
    2020 
     21import java.io.File; 
     22import java.io.IOException; 
     23import java.io.Reader; 
     24 
    2125import xtc.lang.C; 
     26import xtc.lang.CParser; 
    2227import xtc.lang.CPragmaAnalyzer; 
     28import xtc.lang.CReader; 
    2329import xtc.lang.PragmaSymbolTable; 
     30import xtc.lang.c4.C4; 
     31import xtc.parser.ParseException; 
     32import xtc.parser.Result; 
     33import xtc.tree.Formatting; 
     34import xtc.tree.GNode; 
     35import xtc.tree.Location; 
    2436import xtc.tree.Node; 
    2537import xtc.tree.Visitor; 
     
    2739 
    2840public class StatsDriver extends C { 
    29          
    30   public String getName() { 
    31     return "Stats Analysis"; 
     41 
     42        public String getName() { 
     43                return "Stats Analysis"; 
     44} 
     45 
     46public void init() { 
     47        super.init(); 
     48        runtime.bool("pragmaSymbol", "pragmaSymbolAnalysis", false, "Build a symbol table based also on pragma directives"); 
     49} 
     50 
     51public void process(Node node) { 
     52 
     53        // For pragma color analysis 
     54        // So far only print an enhanced version of the Symbol Table 
     55        if (runtime.test("pragmaSymbolAnalysis")) { 
     56                System.out.println("PRAGMA SYMBOL"); 
     57                PragmaSymbolTable pragmaTable = new PragmaSymbolTable(); 
     58                new CPragmaAnalyzer(runtime).analyze(node, pragmaTable); 
     59                // Save the registered visitor. 
     60                Visitor visitor = runtime.console().visitor(); 
     61                // Note that the type printer's constructor registers the just 
     62                // created printer with the console. 
     63                new TypePrinter(runtime.console());  
     64                try { 
     65                        if( pragmaTable != null ); 
     66                        //pragmaTable.root().dump(runtime.console()); 
     67                } finally { 
     68                        // Restore the previously registered visitor. 
     69                        runtime.console().register(visitor); 
     70                } 
     71                runtime.console().flush(); 
     72        } 
     73} 
     74 
     75/** 
     76 * Print memoization information. 
     77 *  
     78 * @param parser 
     79 *          The parser. 
     80 * @param file 
     81 *          The file. 
     82 */ 
     83private void printMemoInfo(Object parser, File file) { 
     84        if (runtime.test("printMemoProfile")) { 
     85                try { 
     86                        profile.invoke(parser, new Object[] { runtime.console() }); 
     87                } catch (Exception x) { 
     88                        runtime.error(file + ": " + x.getMessage()); 
     89                } 
     90                runtime.console().pln().flush(); 
     91        } 
     92 
     93        if (runtime.test("printMemoTable")) { 
     94                try { 
     95                        dump.invoke(parser, new Object[] { runtime.console() }); 
     96                } catch (Exception x) { 
     97                        runtime.error(file + ": " + x.getMessage()); 
     98                } 
     99                runtime.console().flush(); 
     100        } 
     101} 
     102public Node parse(Reader in, File file) throws IOException, ParseException { 
     103        if (runtime.test("optionParseTree")) { // ======================== Reader 
     104                if (runtime.test("optionNoIncr")) { 
     105                        StatsReader parser = new StatsReader(in, file.toString(), (int)file.length()); 
     106                        Result  result = parser.pTranslationUnit(0); 
     107                        printMemoInfo(parser, file); 
     108                        return (Node)parser.value(result); 
     109                } else { 
     110                        StatsReader parser = new StatsReader(in, file.getName()); 
     111                        GNode   unit   = GNode.create("TranslationUnit"); 
     112                        unit.setLocation(new Location(file.toString(), 1, 0)); 
     113                        Node    root   = unit; 
     114                        boolean first  = true; 
     115 
     116                        while (! parser.isEOF(0)) { 
     117                                Result result = 
     118                                        first ? parser.pPrelude(0) : parser.pExternalDeclaration(0); 
     119                                        printMemoInfo(parser, file); 
     120                                        if (! result.hasValue()) parser.signal(result.parseError()); 
     121 
     122                                        if (first) { 
     123                                                root = Formatting.before1(result.semanticValue(), unit); 
     124                                                first = false; 
     125                                        } else { 
     126                                                unit.add(result.semanticValue()); 
     127                                        } 
     128                                        parser.resetTo(result.index); 
     129                        } 
     130 
     131                        // Grab any trailing annotations. 
     132                        Result result = parser.pAnnotations(0); 
     133                        if (! result.hasValue()) parser.signal(result.parseError()); 
     134                        unit.add(result.semanticValue()); 
     135 
     136                        return root; 
     137                } 
     138 
     139        } else if (runtime.test("optionNoIncr")) { // ==================== Parser 
     140                StatsParser parser = new StatsParser(in, file.toString(), (int)file.length()); 
     141                Result  result = parser.pTranslationUnit(0); 
     142                printMemoInfo(parser, file); 
     143                return (Node)parser.value(result); 
     144 
     145        } else { 
     146                StatsParser parser = new StatsParser(in, file.getName()); 
     147                GNode   root   = GNode.create("TranslationUnit"); 
     148                boolean first  = true; 
     149 
     150                while (! parser.isEOF(0)) { 
     151                        Result result = 
     152                                first ? parser.pPrelude(0) : parser.pExternalDeclaration(0); 
     153                                printMemoInfo(parser, file); 
     154                                if (! result.hasValue()) parser.signal(result.parseError()); 
     155 
     156                                if (first) { 
     157                                        first = false; 
     158                                } else { 
     159                                        root.add(result.semanticValue()); 
     160                                } 
     161                                parser.resetTo(result.index); 
     162                } 
     163 
     164                // Grab any trailing annotations. 
     165                        Result result = parser.pAnnotations(0); 
     166                        if (! result.hasValue()) parser.signal(result.parseError()); 
     167                        root.add(result.semanticValue()); 
     168 
     169                        return root; 
     170                } 
     171        } 
     172 
     173 
     174  /** 
     175   * Run the tool with the specified command line arguments. 
     176   *  
     177   * @param args 
     178   *          The command line arguments. 
     179   */ 
     180  public static void main(String[] args) { 
     181    new StatsDriver().run(args); 
    32182  } 
    33    
    34   public void init() { 
    35     super.init(); 
    36     runtime.bool("pragmaSymbol", "pragmaSymbolAnalysis", false, "Build a symbol table based also on pragma directives"); 
    37   } 
    38    
    39   public void process(Node node) { 
    40         super.process(node); 
    41         // For pragma color analysis 
    42     // So far only print an enhanced version of the Symbol Table 
    43         if (runtime.test("pragmaSymbol")) { 
    44           System.out.println("PRAGMA SYMBOL"); 
    45           PragmaSymbolTable pragmaTable = new PragmaSymbolTable(); 
    46           new CPragmaAnalyzer(runtime).analyze(node, pragmaTable); 
    47           // Save the registered visitor. 
    48           Visitor visitor = runtime.console().visitor(); 
    49           // Note that the type printer's constructor registers the just 
    50           // created printer with the console. 
    51           new TypePrinter(runtime.console());  
    52           try { 
    53                 if( pragmaTable != null ); 
    54               //pragmaTable.root().dump(runtime.console()); 
    55             } finally { 
    56               // Restore the previously registered visitor. 
    57               runtime.console().register(visitor); 
    58             } 
    59             runtime.console().flush(); 
    60           } 
    61   } 
     183 
    62184} 
  • trunk/src/xtc/lang/stats/StatsParser.java

    r9 r10  
    33// Rats! Parser Generator, version 1.13.3, 
    44// (C) 2004-2008 Robert Grimm, 
    5 // on Thursday, July 3, 2008 at 11:32:18 PM. 
     5// on Monday, July 7, 2008 at 9:56:36 PM. 
    66// Edit at your own risk. 
    77// =========================================================================== 
     
    4141  public static final Set<String> C_KEYWORDS = new HashSet<String>(); 
    4242 
     43  /** The STATS flag. */ 
     44  public static final boolean STATS = true; 
     45 
     46  /** The RELOCATE flag. */ 
     47  public static final boolean RELOCATE = true; 
     48 
    4349  /** The C99 flag. */ 
    4450  public static final boolean C99 = true; 
    45  
    46   /** The RELOCATE flag. */ 
    47   public static final boolean RELOCATE = true; 
    4851 
    4952  // ========================================================================= 
     
    8790    Result fAssemblyOperand; 
    8891    Result fAsmKeyword; 
     92    Result fPragmaStatement; 
    8993    Result fExponent; 
    90     Result f$$Shared2; 
    9194  } 
    9295 
    9396  /** Chunk 4 of memoized results. */ 
    9497  static final class Chunk4 { 
     98    Result f$$Shared2; 
    9599    Result fBinaryExponent; 
    96100    Result fCharacterLiteral; 
     
    102106    Result fIdentifier; 
    103107    Result fKeyword; 
    104     Result fWord; 
    105108  } 
    106109 
    107110  /** Chunk 5 of memoized results. */ 
    108111  static final class Chunk5 { 
     112    Result fWord; 
    109113    Result fSymbol; 
    110114  } 
     
    273277    // Start a state modification. 
    274278    yyState.start(); 
     279 
     280    // Alternative <PragmaExt>. 
     281 
     282    yyResult = pPragmaStatement(yyStart); 
     283    yyError  = yyResult.select(yyError); 
     284    if (yyResult.hasValue()) { 
     285      yyValue = yyResult.semanticValue(); 
     286 
     287      // Commit the state modification. 
     288      yyState.commit(); 
     289 
     290      return yyResult.createValue(yyValue, yyError); 
     291    } 
    275292 
    276293    // Alternative <Declaration>. 
     
    52085225  private Result pStatement$1(final int yyStart) throws IOException { 
    52095226    Result     yyResult; 
    5210     Result     yyPredResult; 
    52115227    int        yyBase; 
    5212     int        yyRepetition1; 
    5213     boolean    yyRepeated1; 
    5214     Pair<Node> yyRepValue1; 
    52155228    int        yyOption1; 
    52165229    Node       yyOpValue1; 
     
    52185231    ParseError yyError = ParseError.DUMMY; 
    52195232 
    5220     // Alternative 1. 
     5233    // Alternative <PragmaIn>. 
     5234 
     5235    yyResult = pPragmaStatement(yyStart); 
     5236    yyError  = yyResult.select(yyError); 
     5237    if (yyResult.hasValue()) { 
     5238      yyValue = yyResult.semanticValue(); 
     5239 
     5240      return yyResult.createValue(yyValue, yyError); 
     5241    } 
     5242 
     5243    // Alternative 2. 
    52215244 
    52225245    yyResult = pCommaExpression(yyStart); 
     
    52495272    } 
    52505273 
    5251     // Alternative 3. 
     5274    // Alternative 4. 
    52525275 
    52535276    yyResult = pKeyword(yyStart); 
     
    53115334      } else { 
    53125335        yyError = yyError.select("\"(\" expected", yyBase); 
    5313       } 
    5314     } 
    5315  
    5316     // Alternative 4. 
    5317  
    5318     yyResult = pSymbol(yyStart); 
    5319     yyError  = yyResult.select(yyError); 
    5320     if (yyResult.hasValue("#")) { 
    5321  
    5322       yyRepetition1 = yyResult.index; 
    5323       while (true) { 
    5324  
    5325         yyResult = pSpace(yyRepetition1); 
    5326         yyError  = yyResult.select(yyError); 
    5327         if (yyResult.hasValue()) { 
    5328  
    5329           yyRepetition1 = yyResult.index; 
    5330           continue; 
    5331         } 
    5332         break; 
    5333       } 
    5334  
    5335       final int yyChoice1 = yyRepetition1; 
    5336  
    5337       // Nested alternative 1. 
    5338  
    5339       yyBase   = yyChoice1; 
    5340       yyResult = pKeyword(yyBase); 
    5341       yyError  = yyResult.select(yyError); 
    5342       if (yyResult.hasValue("pragma if ")) { 
    5343  
    5344         yyResult = pCommaExpression(yyResult.index); 
    5345         yyError  = yyResult.select(yyError); 
    5346         if (yyResult.hasValue()) { 
    5347           final Node v$g$1 = yyResult.semanticValue(); 
    5348  
    5349           yyPredResult = pLineTerminator(yyResult.index); 
    5350           yyError      = yyPredResult.select(yyError); 
    5351           if (yyPredResult.hasValue()) { 
    5352  
    5353             final int yyChoice2 = yyResult.index; 
    5354  
    5355             // Nested alternative 1. 
    5356  
    5357             yyResult = pStatement(yyChoice2); 
    5358             yyError  = yyResult.select(yyError); 
    5359             if (yyResult.hasValue()) { 
    5360               final Node v$g$2 = yyResult.semanticValue(); 
    5361  
    5362               yyBase   = yyResult.index; 
    5363               yyResult = pSymbol(yyBase); 
    5364               yyError  = yyResult.select(yyError); 
    5365               if (yyResult.hasValue("#")) { 
    5366  
    5367                 yyRepetition1 = yyResult.index; 
    5368                 while (true) { 
    5369  
    5370                   yyResult = pSpace(yyRepetition1); 
    5371                   yyError  = yyResult.select(yyError); 
    5372                   if (yyResult.hasValue()) { 
    5373  
    5374                     yyRepetition1 = yyResult.index; 
    5375                     continue; 
    5376                   } 
    5377                   break; 
    5378                 } 
    5379  
    5380                 yyBase   = yyRepetition1; 
    5381                 yyResult = pKeyword(yyBase); 
    5382                 yyError  = yyResult.select(yyError); 
    5383                 if (yyResult.hasValue("pragma else ")) { 
    5384  
    5385                   yyRepetition1 = yyResult.index; 
    5386                   while (true) { 
    5387  
    5388                     yyResult = pSpace(yyRepetition1); 
    5389                     yyError  = yyResult.select(yyError); 
    5390                     if (yyResult.hasValue()) { 
    5391  
    5392                       yyRepetition1 = yyResult.index; 
    5393                       continue; 
    5394                     } 
    5395                     break; 
    5396                   } 
    5397  
    5398                   yyPredResult = pLineTerminator(yyRepetition1); 
    5399                   yyError      = yyPredResult.select(yyError); 
    5400                   if (yyPredResult.hasValue()) { 
    5401  
    5402                     yyResult = pStatement(yyRepetition1); 
    5403                     yyError  = yyResult.select(yyError); 
    5404                     if (yyResult.hasValue()) { 
    5405                       final Node v$g$3 = yyResult.semanticValue(); 
    5406  
    5407                       yyBase   = yyResult.index; 
    5408                       yyResult = pSymbol(yyBase); 
    5409                       yyError  = yyResult.select(yyError); 
    5410                       if (yyResult.hasValue("#")) { 
    5411  
    5412                         yyRepetition1 = yyResult.index; 
    5413                         while (true) { 
    5414  
    5415                           yyResult = pSpace(yyRepetition1); 
    5416                           yyError  = yyResult.select(yyError); 
    5417                           if (yyResult.hasValue()) { 
    5418  
    5419                             yyRepetition1 = yyResult.index; 
    5420                             continue; 
    5421                           } 
    5422                           break; 
    5423                         } 
    5424  
    5425                         yyBase   = yyRepetition1; 
    5426                         yyResult = pKeyword(yyBase); 
    5427                         yyError  = yyResult.select(yyError); 
    5428                         if (yyResult.hasValue("pragma endif ")) { 
    5429  
    5430                           yyRepetition1 = yyResult.index; 
    5431                           while (true) { 
    5432  
    5433                             yyResult = pSpace(yyRepetition1); 
    5434                             yyError  = yyResult.select(yyError); 
    5435                             if (yyResult.hasValue()) { 
    5436  
    5437                               yyRepetition1 = yyResult.index; 
    5438                               continue; 
    5439                             } 
    5440                             break; 
    5441                           } 
    5442  
    5443                           yyPredResult = pLineTerminator(yyRepetition1); 
    5444                           yyError      = yyPredResult.select(yyError); 
    5445                           if (yyPredResult.hasValue()) { 
    5446  
    5447                             yyValue = GNode.create("IfElsePStatement", v$g$1, v$g$2, v$g$3); 
    5448                             yyValue.setLocation(location(yyStart)); 
    5449  
    5450                             return new SemanticValue(yyValue, yyRepetition1, yyError); 
    5451                           } 
    5452                         } else { 
    5453                           yyError = yyError.select("\"pragma endif \" expected", yyBase); 
    5454                         } 
    5455                       } else { 
    5456                         yyError = yyError.select("\"#\" expected", yyBase); 
    5457                       } 
    5458                     } 
    5459                   } 
    5460                 } else { 
    5461                   yyError = yyError.select("\"pragma else \" expected", yyBase); 
    5462                 } 
    5463               } else { 
    5464                 yyError = yyError.select("\"#\" expected", yyBase); 
    5465               } 
    5466             } 
    5467  
    5468             // Nested alternative 2. 
    5469  
    5470             yyRepetition1 = yyChoice2; 
    5471             yyRepeated1   = false; 
    5472             yyRepValue1   = Pair.empty(); 
    5473             while (true) { 
    5474  
    5475               yyResult = pPragmaElif(yyRepetition1); 
    5476               yyError  = yyResult.select(yyError); 
    5477               if (yyResult.hasValue()) { 
    5478                 final Node v$el$1 = yyResult.semanticValue(); 
    5479  
    5480                 yyRepetition1 = yyResult.index; 
    5481                 yyRepeated1   = true; 
    5482                 yyRepValue1   = new Pair<Node>(v$el$1, yyRepValue1); 
    5483                 continue; 
    5484               } 
    5485               break; 
    5486             } 
    5487  
    5488             if (yyRepeated1) { 
    5489               final Pair<Node> v$g$4 = yyRepValue1.reverse(); 
    5490  
    5491               yyBase   = yyRepetition1; 
    5492               yyResult = pSymbol(yyBase); 
    5493               yyError  = yyResult.select(yyError); 
    5494               if (yyResult.hasValue("#")) { 
    5495  
    5496                 yyRepetition1 = yyResult.index; 
    5497                 while (true) { 
    5498  
    5499                   yyResult = pSpace(yyRepetition1); 
    5500                   yyError  = yyResult.select(yyError); 
    5501                   if (yyResult.hasValue()) { 
    5502  
    5503                     yyRepetition1 = yyResult.index; 
    5504                     continue; 
    5505                   } 
    5506                   break; 
    5507                 } 
    5508  
    5509                 yyBase   = yyRepetition1; 
    5510                 yyResult = pKeyword(yyBase); 
    5511                 yyError  = yyResult.select(yyError); 
    5512                 if (yyResult.hasValue("pragma endif ")) { 
    5513  
    5514                   yyRepetition1 = yyResult.index; 
    5515                   while (true) { 
    5516  
    5517                     yyResult = pSpace(yyRepetition1); 
    5518                     yyError  = yyResult.select(yyError); 
    5519                     if (yyResult.hasValue()) { 
    5520  
    5521                       yyRepetition1 = yyResult.index; 
    5522                       continue; 
    5523           &nb