Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/04/13 18:05:17 (11 years ago)
Author:
gkronber
Message:

#2026 simplified symb-reg example, cleaned ATG file (whitespace), removed obsolete files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/GPDef.atg

    r9430 r9696  
    55  digit = '0'..'9'.
    66  whiteSpace = CHR(9) + EOL IGNORE. /* ' ' ignored by default */
    7  
     7
    88COMMENTS
    99  FROM '/*' TO '*/' NESTED.
     
    1414  'SEM'. 'MAXIMIZE'. 'MINIMIZE'. 'TERMINALS'. 'CONSTRAINTS'. 'INIT'. 'CODE'.
    1515  'IN'. 'SET'. 'RANGE'.
    16  
     16
    1717TOKENS
    1818  '='. '|'. '.'. '('. ')'. '['. ']'. '{'. '}'. '>>'. '..'.
    19  
     19
    2020TOKEN CLASSES
    2121  ident = letter {letter | digit}.
    22  
     22
    2323PRAGMAS
    2424  source       = '<<' SEM <<for (; ; ) {
     
    4646                              }
    4747                            }>>
    48   . 
     48  .
    4949NONTERMINALS
    5050  GPDefSyntaxAnalyzer.   
     
    5252  RuleDef. SynExpr. SynTerm. SynFact. TerminalDecl.
    5353  ConstraintDef. ConstraintRule. SetDefinition.
    54  
     54
    5555RULES
    5656  GPDefSyntaxAnalyzer =
    5757    'PROBLEM' ident
    58   ['CODE' /* SourceText */]
    59   ['INIT' /* SourceText */]
     58  ['CODE' /* SourceText */]
     59  ['INIT' /* SourceText */]
    6060    'NONTERMINALS' { NonterminalDecl }
    6161    'TERMINALS' { TerminalDecl }
    6262    'RULES' { RuleDef }
    63     ('MAXIMIZE' | 'MINIMIZE') /* SourceText */ 
     63    ('MAXIMIZE' | 'MINIMIZE') /* SourceText */
    6464    'END' ident '.'.
    65  
    66  
    67   SemDecl = 'LOCAL' /* SourceText */                                               
     65
     66
     67  SemDecl = 'LOCAL' /* SourceText */
    6868  .
    69  
    70   SemAction = 'SEM' /* SourceText */                                               
     69
     70  SemAction = 'SEM' /* SourceText */
    7171  .
    72  
    73   NonterminalDecl = ident /* FormalAttrList */ '.'                                 
    74                                                                                    
    75                                        
    76                                                                                    
     72
     73  NonterminalDecl = ident /* FormalAttrList */ '.'
    7774  .
    78  
    79   TerminalDecl = ident /* FormalAttrList */   
     75
     76  TerminalDecl = ident /* FormalAttrList */
    8077    [ 'CONSTRAINTS' ConstraintDef ]
    81     '.'     
     78    '.'
    8279  .
    83  
     80
    8481  ConstraintDef = { ConstraintRule }.
    8582  ConstraintRule = ident 'IN' SetDefinition .
    8683  SetDefinition =
    8784    'SET' /* SourceText */
    88   | 'RANGE' /* SourceText */ '..' /* SourceText */
     85    | 'RANGE' /* SourceText */ '..' /* SourceText */
    8986  .
    90  
    91   RuleDef = ident /* FormalAttrList */ '=' [SemDecl] SynExpr '.'                   
     87
     88  RuleDef = ident /* FormalAttrList */ '=' [SemDecl] SynExpr '.'
    9289  .
    93  
    94   SynExpr = SynTerm {'|' SynTerm}                                                 
     90
     91  SynExpr = SynTerm {'|' SynTerm}
    9592  .
    96  
    97   SynTerm = SynFact {SynFact}                                                     
     93
     94  SynTerm = SynFact {SynFact}
    9895  .
    99  
     96
    10097  SynFact =
    101     ident /* ActualAttrList */                                                     
    102     | 'EPS'                                                                       
    103     | '(' SynExpr ')'                                                             
    104     | '[' SynExpr ']'                                                             
    105     | '{' SynExpr '}'                                                             
    106     | SemAction                                                                       
     98    ident /* ActualAttrList */
     99    | 'EPS'
     100    | '(' SynExpr ')'
     101    | '[' SynExpr ']'
     102    | '{' SynExpr '}'
     103    | SemAction
    107104  .
    108105
Note: See TracChangeset for help on using the changeset viewer.