Changeset 221


Ignore:
Timestamp:
Nov 3, 2002, 12:03:20 AM (18 years ago)
Author:
orlov
Message:

* empty log message *

Location:
to-imperative/trunk/docs
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/docs/abstract_syntax.txt

    r76 r221  
    1111e.ModuleBody ::= t.Item | e.ModuleBody t.Item
    1212
    13 t.Item ::= t.Function | t.Object | t.Pragma | t.Const
     13t.Item ::= t.Function | t.Object | t.Const
    1414
    1515s.Linkage ::= s.IntLinkage | s.ExtLinkage
     
    1919s.ExtLinkage ::= IMPORT
    2020
    21 t.Function ::= (s.IntLinkage s.FunctionTag t.FunctionName
    22                 t.InputFormat t.OutputFormat e.Sentence) |
    23                (s.ExtLinkage s.FunctionTag t.FunctionName
     21t.Function ::= (s.IntLinkage s.FunctionTag t.Pragma t.FunctionName
     22                t.InputFormat t.OutputFormat t.Branch) |
     23               (s.ExtLinkage s.FunctionTag t.Pragma t.FunctionName
    2424                t.InputFormat t.OutputFormat)
    2525
    2626s.FunctionTag ::= FUNC | FUNC?
    2727
     28t.Pragma ::= (PRAGMA e.PragmaBody)
     29
     30e.PragmaBody ::= [Empty] | t.PragmaTerm e.PragmaBody
     31
     32t.PragmaTerm ::= (FILE e.FileName)
     33               | (LINE s.Line s.Column)
     34               | (TRACE e.TraceNames)
     35
     36e.FileName ::= [Sequence of liters]
     37
     38s.Line ::= [Number]
     39
     40s.Column ::= [Number]
     41
     42e.TraceNames ::= [Empty] | t.TraceName e.TraceNames
     43
     44t.TraceName ::= t.Name
     45
    2846t.FunctionName ::= t.Name
    2947
    30 t.InputFormat ::= t.Format
     48t.InputFormat ::= t.FunFormat
    3149
    32 t.OutputFormat ::= t.Format
     50t.OutputFormat ::= t.FunFormat
    3351
    34 t.Format ::= (FORMAT e.HardExpression)
     52t.FunFormat ::= (e.HardExpression)
    3553
    36 e.HardExpression ::= e.HardTerms |
    37                      e.HardTerms t.EVar e.HardTerms |
    38                      e.HardTerms t.VVar e.HardTerms
     54t.Format ::= (FORMAT t.Pragma e.HardExpression)
     55
     56e.HardExpression ::= e.HardTerms
     57                   | e.HardTerms t.EVar e.HardTerms
     58                   | e.HardTerms t.VVar e.HardTerms
    3959
    4060e.HardTerms ::= [Empty] | t.HardTerm e.HardTerms
     
    4262t.HardTerm ::= t.Symbol | (PAREN e.HardExpression) | t.SVar | t.TVar
    4363
    44 t.Block ::= (BLOCK e.Branches)
     64e.Block?! ::= t.Block | NOFAIL t.Block
     65
     66t.Block ::= (BLOCK t.Pragma e.Branches)
    4567
    4668e.Branches ::= [Empty] | t.Branch e.Branches
    4769
    48 t.Branch ::= (BRANCH e.Sentence)
     70t.Branch ::= (BRANCH t.Pragma e.Sentence)
    4971
    50 e.Sentence ::= [Empty] | t.Statement e.Sentence
     72e.Sentence ::= [Empty] | e.Block?! e.Sentence | t.Statement e.Sentence
    5173
    52 t.Statement ::= t.Action | t.Operator | t.ComplexOperator | t.Pragma
     74t.Statement ::= t.Action | t.Operator | t.ComplexOperator
    5375
    54 t.Operator ::= CUT | CUTALL | STAKE | NOFAIL | FAIL | ERROR
     76t.Operator ::= (CUT    t.Pragma)
     77             | (CUTALL t.Pragma)
     78             | (STAKE  t.Pragma)
     79             | (FAIL   t.Pragma)
     80             | (ERROR  t.Pragma)
    5581
    56 t.ComplexOperator ::= (NOT e.Sentence) |
    57                       (ITER t.IterBody t.IterVars t.IterCondition) |
    58                       (TRY t.TrySentence t.CatchSentence)
     82t.ComplexOperator ::= (NOT t.Branch)
     83                    | (ITER t.IterBody t.IterVars t.IterCondition)
     84                    | (TRY t.TryBranch e.CatchBlock)
    5985
    60 t.IterBody ::= (e.Sentence)
     86t.IterBody ::= t.Branch
    6187
    6288t.IterVars ::= t.Format
    6389
    64 t.IterCondition ::= (e.Sentence)
     90t.IterCondition ::= t.Branch
    6591
    66 t.TrySentence ::= (e.Sentence)
     92t.TryBranch ::= t.Branch
    6793
    68 t.CatchSentence ::= (e.Sentence)
     94e.CatchBlock ::= e.Block?!
    6995
    7096t.Action ::= t.Pattern | t.Result | t.Format | t.Block
    7197
    72 t.Pattern ::= (LEFT e.PatternExpression) | (RIGHT e.PatternExpression)
     98t.Pattern ::= (LEFT  t.Pragma e.PatternExpression)
     99            | (RIGHT t.Pragma e.PatternExpression)
    73100
    74101e.PatternExpression ::= [Empty] | t.PatternTerm e.PatternExpression
     
    78105t.Variable ::= t.EVar | t.VVar | t.TVar | t.Svar
    79106
    80 t.EVar ::= (EVAR t.Name)
     107t.EVar ::= (EVAR t.Pragma t.Name) | (EVAR)
    81108
    82 t.VVar ::= (VVAR t.Name)
     109t.VVar ::= (VVAR t.Pragma t.Name) | (VVAR)
    83110
    84 t.TVar ::= (TVAR t.Name)
     111t.TVar ::= (TVAR t.Pragma t.Name) | (TVAR)
    85112
    86 t.SVar ::= (SVAR t.Name)
     113t.SVar ::= (SVAR t.Pragma t.Name) | (SVAR)
    87114
    88115t.Name ::= (e.QualifiedName)
     
    90117e.QualifiedName ::= [Word] | e.QualifiedName [Word]
    91118
    92 t.Result ::= (RESULT e.ResultExpression)
     119t.Result ::= (RESULT t.Pragma e.ResultExpression)
    93120
    94 e.ResultExpression ::= [Empty] | t.ResultTerm e.ResultExpression
     121e.ResultExpression ::= [Empty]
     122                     | e.Block?! e.ResultExpression
     123                     | t.ResultTerm e.ResultExpression
    95124
    96 t.ResultTerm ::= t.Symbol | (PAREN e.ResultExpression) | t.Variable |
    97                  (CALL e.ResultExpression) | t.Block
     125t.ResultTerm ::= t.Symbol | (PAREN e.ResultExpression) | t.Variable
     126               | (CALL t.Pragma e.ResultExpression)
    98127
    99128t.Symbol ::= s.ObjectSymbol | (REF t.Name)
     
    101130s.ObjectSymbol ::= [Symbol]
    102131
    103 t.Object ::= (s.Linkage s.ObjectType t.ObjectName)
     132t.Object ::= (s.Linkage s.ObjectType t.Pragma t.ObjectName)
    104133
    105134s.ObjectType ::= TABLE | BOX | STRING | VECTOR | CHANNEL
     
    109138t.Initializer ::= (EXEC e.ResultExpression)
    110139
    111 t.Pragma ::= (PRAGMA e.PragmaBody)
    112 
    113 s.PragmaBody ::= e.PragmaFile | e.PragmaLine | e.PragmaTrace
    114 
    115 e.PragmaFile ::= FILE s.FileName
    116 
    117 s.FileName ::= [Word]
    118 
    119 e.PragmaLine ::= LINE s.Line s.Column
    120 
    121 s.Line ::= [Number]
    122 
    123 s.Column ::= [Number]
    124 
    125 e.PragmaTrace ::= TRACE e.TraceNames
    126 
    127 e.TraceNames ::= [Empty] | t.TraceName e.TraceNames
    128 
    129 t.TraceName ::= t.Name
    130 
    131 t.Const ::= (s.IntLinkage CONST t.ConstName e.ConstExpression) |
    132             (s.ExtLinkage CONST t.ConstName)
     140t.Const ::= (s.Linkage CONST t.Pragma t.ConstName e.ConstExpression)
    133141
    134142t.ConstName ::= t.Name
     
    136144e.ConstExpression ::= [Empty] | t.ConstTerm e.ConstExpression
    137145
    138 t.ConstTerm ::= t.Symbol | (PAREN e.ConstExpression) | t.Variable
     146t.ConstTerm ::= t.Symbol | (PAREN e.ConstExpression)
    139147
Note: See TracChangeset for help on using the changeset viewer.