SmaCC__SmaCCGrammarParser.st
author vranyj1
Wed, 17 Nov 2010 21:57:55 +0000
changeset 20 4ea23addc2c4
parent 14 76468a870e05
permissions -rw-r--r--
Makefile updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
     1
"{ Package: 'stx:goodies/smaCC' }"
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
     2
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
     3
"{ NameSpace: SmaCC }"
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
     4
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
     5
SmaCCParser subclass:#SmaCCGrammarParser
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
     6
	instanceVariableNames:'grammar'
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
     7
	classVariableNames:''
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
     8
	poolDictionaries:''
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
     9
	category:'SmaCC-Parser Generator'
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    10
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    11
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    12
SmaCCGrammarParser comment:'SmaCCGrammarParser is a parser for grammars.
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    13
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    14
Instance Variables:
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    15
	grammar	<SmaCCGrammar>	the grammar we are producing
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    16
'
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    17
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    18
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    19
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    20
!SmaCCGrammarParser class methodsFor:'generated-accessing'!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    21
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    22
scannerClass
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    23
	^SmaCC::SmaCCGrammarScanner
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    24
! !
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    25
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    26
!SmaCCGrammarParser class methodsFor:'generated-comments'!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    27
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    28
parserDefinitionComment
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    29
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    30
	"File:   Parser {grammar addEmptySymbol; yourself};
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    31
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    32
Parser: Rule
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    33
        | Parser Rule ;
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    34
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    35
Rule : ProductionRule {grammar setStartSymbolIfNone: '1'. nil}
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    36
        | LeftLine 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    37
        | RightLine 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    38
        | NonAssociativeLine
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    39
        | IdMethodLine
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    40
        | StartLine ;
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    41
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    42
LeftLine:       ""%left"" TokenList 'tokens' "";"" { tokens do: [:each | grammar leftPrecedenceFor: each; setOperatorPrecedenceFor: each to: scanner lineNumber]. nil };
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    43
RightLine:      ""%right"" TokenList 'tokens' "";"" { tokens do: [:each | grammar rightPrecedenceFor: each; setOperatorPrecedenceFor: each to: scanner lineNumber]. nil };
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    44
NonAssociativeLine: ""%nonassoc"" TokenList 'tokens' "";"" { tokens do: [:each | grammar nonAssociativePrecedenceFor: each; setOperatorPrecedenceFor: each to: scanner lineNumber]. nil };
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    45
IdMethodLine: ""%id"" IdTokens 'tokens' "";"" {tokens do: [:each | grammar makeTokenIdMethodFor: each]. nil};
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    46
StartLine: ""%start"" StartingTokens "";"";
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    47
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    48
IdTokens: <tokenname> {OrderedCollection with: '1' value}
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    49
        | IdTokens <tokenname> {'1' add: '2' value; yourself};
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    50
TokenList:      Term
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    51
        | TokenList Term        ;
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    52
StartingTokens: <symbolname> 'symbol' {grammar addStartingSymbol: (grammar nonTerminalSymbolNamed: symbol value)}
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    53
        | StartingTokens <symbolname> 'symbol' {grammar addStartingSymbol: (grammar nonTerminalSymbolNamed: symbol value)};
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    54
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    55
ProductionRule: <symbolname> <production> ParserRules "";"" {| symbol | symbol := grammar nonTerminalSymbolNamed: '1' value. '3' do: [:each | symbol addProduction: each]. symbol};
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    56
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    57
ParserRules:    ParserRules ""|"" ParserRule {'1' add: '3'; yourself}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    58
        | ParserRule     ;
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    59
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    60
ParserRule : Terms 'rhs' {rhs}
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    61
        | Terms 'rhs' <code> 'code' {self verifyCodeToken: code for: rhs} ;
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    62
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    63
Terms : {SmaCCRHS new}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    64
        | Terms 'rhs' Term 'term'       {rhs add: term; yourself}       
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    65
        | Terms 'rhs' Term 'term' <variablename> 'variableNameToken'    {rhs add: term; nameLastItem: (variableNameToken value copyFrom: 2 to: variableNameToken value size - 1); yourself}     
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    66
        | Terms 'rhs' Term 'term' ""?"" {rhs add: (grammar makeOptionalSymbolFor: term); yourself}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    67
        | Terms 'rhs' Term 'term' ""?"" <variablename> 'variableNameToken' {rhs add: (grammar makeOptionalSymbolFor: term); nameLastItem: (variableNameToken value copyFrom: 2 to: variableNameToken value size - 1); yourself}   
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    68
        | Terms 'rhs' Term 'term' ""*"" {rhs add: (grammar makeRepeatSymbolFor: term); yourself}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    69
        | Terms 'rhs' Term 'term' ""*"" <variablename> 'variableNameToken' {rhs add: (grammar makeRepeatSymbolFor: term); nameLastItem: (variableNameToken value copyFrom: 2 to: variableNameToken value size - 1); yourself}             
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    70
        | Terms 'rhs' Term 'term' ""+"" {rhs add: (grammar makeRepeatMultipleSymbolFor: term); yourself}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    71
        | Terms 'rhs' Term 'term' ""+"" <variablename> 'variableNameToken' {rhs add: (grammar makeRepeatMultipleSymbolFor: term); nameLastItem: (variableNameToken value copyFrom: 2 to: variableNameToken value size - 1); yourself}     ;
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    72
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    73
Term:   <keyword> {grammar keywordTerminalNamed: '1' value}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    74
        | <tokenname> {grammar terminalSymbolNamed: '1' value ifAbsent: [currentToken := '1'. self reportErrorMessage: 'Token not specified']}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    75
        | <symbolname> {grammar nonTerminalSymbolNamed: '1' value}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    76
        | ""error"" {SmaCCSymbol error}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    77
        | ""("" SimpleTerms "")"" {grammar makeGroupFor: '2'}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    78
        | ""<%"" SimpleTerms ""%>"" {grammar makeRepeatSymbolFor: (grammar makeGroupFor: '2')}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    79
        | ""["" SimpleTerms ""]"" {grammar makeOptionalSymbolFor: (grammar makeGroupFor: '2')};
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    80
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    81
SimpleTerms :
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    82
        SimpleTerm {OrderedCollection with: '1'}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    83
        | SimpleTerms 'terms' ""|"" SimpleTerm 'term' {terms add: term; yourself};
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    84
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    85
SimpleTerm :
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    86
        { SmaCCRHS new }
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    87
        | SimpleTerm 'rhs' Term 'term' {rhs add: term; yourself} 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    88
        | SimpleTerm 'rhs' Term 'term' ""?"" {rhs add: (grammar makeOptionalSymbolFor: term); yourself}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    89
        | SimpleTerm 'rhs' Term 'term' ""*"" {rhs add: (grammar makeRepeatSymbolFor: term); yourself}
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    90
        | SimpleTerm 'rhs' Term 'term' ""+"" {rhs add: (grammar makeRepeatMultipleSymbolFor: term); yourself}     ;
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
    91
"
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    92
! !
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    93
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    94
!SmaCCGrammarParser class methodsFor:'generated-starting states'!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    95
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    96
startingStateForFile
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    97
	^1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    98
! !
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
    99
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   100
!SmaCCGrammarParser methodsFor:'accessing'!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   101
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   102
grammar
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   103
	^grammar
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   104
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   105
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   106
grammar: aGrammar
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   107
	grammar := aGrammar
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   108
! !
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   109
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   110
!SmaCCGrammarParser methodsFor:'generated-reduction actions'!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   111
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   112
reduceActionForFile1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   113
    ^ grammar
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   114
        addEmptySymbol;
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   115
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   116
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   117
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   118
reduceActionForIdMethodLine1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   119
    (nodes at:2) do:[:each | 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   120
        grammar makeTokenIdMethodFor:each
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   121
    ].
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   122
    ^ nil
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   123
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   124
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   125
reduceActionForIdTokens1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   126
    ^ OrderedCollection with:(nodes at:1) value
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   127
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   128
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   129
reduceActionForIdTokens2:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   130
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   131
        add:(nodes at:2) value;
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   132
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   133
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   134
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   135
reduceActionForLeftLine1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   136
    (nodes at:2) do:[:each | 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   137
        grammar
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   138
            leftPrecedenceFor:each;
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   139
            setOperatorPrecedenceFor:each to:scanner lineNumber
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   140
    ].
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   141
    ^ nil
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   142
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   143
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   144
reduceActionForNonAssociativeLine1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   145
    (nodes at:2) do:[:each | 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   146
        grammar
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   147
            nonAssociativePrecedenceFor:each;
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   148
            setOperatorPrecedenceFor:each to:scanner lineNumber
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   149
    ].
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   150
    ^ nil
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   151
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   152
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   153
reduceActionForParserRule1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   154
    ^ nodes at:1
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   155
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   156
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   157
reduceActionForParserRule2:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   158
    ^ self verifyCodeToken:(nodes at:2) for:(nodes at:1)
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   159
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   160
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   161
reduceActionForParserRules1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   162
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   163
        add:(nodes at:3);
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   164
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   165
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   166
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   167
reduceActionForProductionRule1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   168
    |symbol|
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   169
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   170
    symbol := grammar nonTerminalSymbolNamed:(nodes at:1) value.
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   171
    (nodes at:3) do:[:each | 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   172
        symbol addProduction:each
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   173
    ].
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   174
    ^ symbol
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   175
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   176
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   177
reduceActionForRightLine1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   178
    (nodes at:2) do:[:each | 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   179
        grammar
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   180
            rightPrecedenceFor:each;
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   181
            setOperatorPrecedenceFor:each to:scanner lineNumber
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   182
    ].
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   183
    ^ nil
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   184
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   185
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   186
reduceActionForRule1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   187
    grammar setStartSymbolIfNone:(nodes at:1).
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   188
    ^ nil
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   189
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   190
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   191
reduceActionForSimpleTerm1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   192
    ^ SmaCCRHS new
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   193
!
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   194
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   195
reduceActionForSimpleTerm2:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   196
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   197
        add:(nodes at:2);
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   198
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   199
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   200
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   201
reduceActionForSimpleTerm3:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   202
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   203
        add:(grammar makeOptionalSymbolFor:(nodes at:2));
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   204
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   205
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   206
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   207
reduceActionForSimpleTerm4:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   208
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   209
        add:(grammar makeRepeatSymbolFor:(nodes at:2));
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   210
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   211
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   212
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   213
reduceActionForSimpleTerm5:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   214
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   215
        add:(grammar makeRepeatMultipleSymbolFor:(nodes at:2));
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   216
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   217
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   218
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   219
reduceActionForSimpleTerms1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   220
    ^ OrderedCollection with:(nodes at:1)
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   221
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   222
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   223
reduceActionForSimpleTerms2:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   224
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   225
        add:(nodes at:3);
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   226
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   227
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   228
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   229
reduceActionForStartingTokens1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   230
    ^ grammar 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   231
        addStartingSymbol:(grammar nonTerminalSymbolNamed:(nodes at:1) value)
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   232
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   233
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   234
reduceActionForStartingTokens2:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   235
    ^ grammar 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   236
        addStartingSymbol:(grammar nonTerminalSymbolNamed:(nodes at:2) value)
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   237
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   238
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   239
reduceActionForTerm1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   240
    ^ grammar keywordTerminalNamed:(nodes at:1) value
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   241
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   242
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   243
reduceActionForTerm2:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   244
    ^ grammar terminalSymbolNamed:(nodes at:1) value
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   245
        ifAbsent:[
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   246
            currentToken := nodes at:1.
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   247
            self reportErrorMessage:'Token not specified'
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   248
        ]
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   249
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   250
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   251
reduceActionForTerm3:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   252
    ^ grammar nonTerminalSymbolNamed:(nodes at:1) value
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   253
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   254
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   255
reduceActionForTerm4:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   256
    ^ SmaCCSymbol error
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   257
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   258
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   259
reduceActionForTerm5:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   260
    ^ grammar makeGroupFor:(nodes at:2)
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   261
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   262
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   263
reduceActionForTerm6:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   264
    ^ grammar makeRepeatSymbolFor:(grammar makeGroupFor:(nodes at:2))
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   265
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   266
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   267
reduceActionForTerm7:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   268
    ^ grammar makeOptionalSymbolFor:(grammar makeGroupFor:(nodes at:2))
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   269
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   270
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   271
reduceActionForTerms1:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   272
    ^ SmaCCRHS new
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   273
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   274
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   275
reduceActionForTerms2:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   276
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   277
        add:(nodes at:2);
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   278
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   279
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   280
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   281
reduceActionForTerms3:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   282
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   283
        add:(nodes at:2);
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   284
        nameLastItem:((nodes at:3) value copyFrom:2
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   285
                    to:(nodes at:3) value size - 1);
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   286
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   287
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   288
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   289
reduceActionForTerms4:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   290
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   291
        add:(grammar makeOptionalSymbolFor:(nodes at:2));
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   292
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   293
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   294
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   295
reduceActionForTerms5:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   296
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   297
        add:(grammar makeOptionalSymbolFor:(nodes at:2));
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   298
        nameLastItem:((nodes at:4) value copyFrom:2
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   299
                    to:(nodes at:4) value size - 1);
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   300
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   301
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   302
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   303
reduceActionForTerms6:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   304
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   305
        add:(grammar makeRepeatSymbolFor:(nodes at:2));
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   306
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   307
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   308
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   309
reduceActionForTerms7:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   310
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   311
        add:(grammar makeRepeatSymbolFor:(nodes at:2));
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   312
        nameLastItem:((nodes at:4) value copyFrom:2
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   313
                    to:(nodes at:4) value size - 1);
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   314
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   315
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   316
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   317
reduceActionForTerms8:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   318
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   319
        add:(grammar makeRepeatMultipleSymbolFor:(nodes at:2));
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   320
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   321
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   322
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   323
reduceActionForTerms9:nodes 
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   324
    ^ (nodes at:1)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   325
        add:(grammar makeRepeatMultipleSymbolFor:(nodes at:2));
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   326
        nameLastItem:((nodes at:4) value copyFrom:2
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   327
                    to:(nodes at:4) value size - 1);
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   328
        yourself
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   329
! !
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   330
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   331
!SmaCCGrammarParser methodsFor:'generated-tables'!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   332
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   333
reduceTable
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   334
	^#(
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   335
#(26 3 #reduceActionForIdMethodLine1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   336
#(27 3 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   337
#(28 1 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   338
#(28 2 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   339
#(29 4 #reduceActionForProductionRule1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   340
#(30 3 #reduceActionForRightLine1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   341
#(31 1 #reduceActionForRule1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   342
#(31 1 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   343
#(31 1 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   344
#(31 1 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   345
#(31 1 #reduceFor:)
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   346
#(31 1 #reduceFor:)
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   347
#(32 1 #reduceActionForTerm1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   348
#(32 1 #reduceActionForTerm2:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   349
#(32 1 #reduceActionForTerm3:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   350
#(32 1 #reduceActionForTerm4:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   351
#(32 3 #reduceActionForTerm5:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   352
#(32 3 #reduceActionForTerm6:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   353
#(32 3 #reduceActionForTerm7:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   354
#(33 1 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   355
#(34 3 #reduceActionForNonAssociativeLine1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   356
#(35 3 #reduceActionForParserRules1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   357
#(35 1 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   358
#(36 1 #reduceActionForParserRule1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   359
#(36 2 #reduceActionForParserRule2:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   360
#(37 0 #reduceActionForTerms1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   361
#(37 2 #reduceActionForTerms2:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   362
#(37 3 #reduceActionForTerms3:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   363
#(37 3 #reduceActionForTerms4:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   364
#(37 4 #reduceActionForTerms5:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   365
#(37 3 #reduceActionForTerms6:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   366
#(37 4 #reduceActionForTerms7:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   367
#(37 3 #reduceActionForTerms8:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   368
#(37 4 #reduceActionForTerms9:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   369
#(38 1 #reduceActionForStartingTokens1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   370
#(38 2 #reduceActionForStartingTokens2:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   371
#(39 1 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   372
#(39 2 #reduceFor:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   373
#(40 1 #reduceActionForIdTokens1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   374
#(40 2 #reduceActionForIdTokens2:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   375
#(41 1 #reduceActionForSimpleTerms1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   376
#(41 3 #reduceActionForSimpleTerms2:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   377
#(42 0 #reduceActionForSimpleTerm1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   378
#(42 2 #reduceActionForSimpleTerm2:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   379
#(42 3 #reduceActionForSimpleTerm3:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   380
#(42 3 #reduceActionForSimpleTerm4:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   381
#(42 3 #reduceActionForSimpleTerm5:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   382
#(45 1 #reduceActionForFile1:)
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   383
#(46 3 #reduceActionForLeftLine1:)
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   384
)
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   385
!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   386
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   387
transitionTable
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   388
	^#(
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   389
#[1 0 9 0 1 0 13 0 3 0 17 0 4 0 21 0 6 0 25 0 8 0 29 0 20 0 33 0 26 0 37 0 27 0 41 0 29 0 45 0 30 0 49 0 31 0 53 0 34 0 57 0 39 0 61 0 45 0 65 0 46]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   390
#[1 0 69 0 20 0 73 0 38]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   391
#[1 0 77 0 11 0 81 0 13 0 85 0 16 0 89 0 17 0 93 0 19 0 97 0 20 0 101 0 21 0 105 0 28 0 109 0 32]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   392
#[1 0 113 0 19 0 117 0 40]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   393
#[1 0 77 0 11 0 81 0 13 0 85 0 16 0 89 0 17 0 93 0 19 0 97 0 20 0 101 0 21 0 121 0 28 0 109 0 32]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   394
#[1 0 77 0 11 0 81 0 13 0 85 0 16 0 89 0 17 0 93 0 19 0 97 0 20 0 101 0 21 0 125 0 28 0 109 0 32]
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   395
#[0 0 129 0 25]
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   396
#[0 0 46 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   397
#[0 0 50 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   398
#[0 0 30 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   399
#[0 0 38 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   400
#[0 0 150 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   401
#[0 0 42 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   402
#[1 0 9 0 1 0 13 0 3 0 17 0 4 0 21 0 6 0 25 0 8 0 29 0 20 0 33 0 26 0 37 0 27 0 41 0 29 0 45 0 30 0 133 0 31 0 53 0 34 0 194 0 43 0 65 0 46]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   403
#[0 0 0 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   404
#[0 0 34 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   405
#[0 0 142 0 7 0 20]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   406
#[1 0 137 0 7 0 141 0 20]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   407
#[1 0 174 0 2 0 174 0 11 0 174 0 13 0 174 0 14 0 174 0 16 0 174 0 17 0 174 0 19 0 174 0 20 0 174 0 21 0 145 0 41 0 149 0 42]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   408
#[1 0 174 0 2 0 174 0 10 0 174 0 11 0 174 0 13 0 174 0 16 0 174 0 17 0 174 0 19 0 174 0 20 0 174 0 21 0 153 0 41 0 149 0 42]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   409
#[0 0 66 0 2 0 5 0 7 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 19 0 20 0 21 0 23 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   410
#[1 0 174 0 2 0 174 0 11 0 174 0 12 0 174 0 13 0 174 0 16 0 174 0 17 0 174 0 19 0 174 0 20 0 174 0 21 0 157 0 41 0 149 0 42]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   411
#[0 0 58 0 2 0 5 0 7 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 19 0 20 0 21 0 23 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   412
#[0 0 62 0 2 0 5 0 7 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 19 0 20 0 21 0 23 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   413
#[0 0 54 0 2 0 5 0 7 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 19 0 20 0 21 0 23 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   414
#[1 0 161 0 7 0 77 0 11 0 81 0 13 0 85 0 16 0 89 0 17 0 93 0 19 0 97 0 20 0 101 0 21 0 165 0 32]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   415
#[0 0 14 0 7 0 11 0 13 0 16 0 17 0 19 0 20 0 21]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   416
#[0 0 158 0 7 0 19]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   417
#[1 0 169 0 7 0 173 0 19]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   418
#[1 0 177 0 7 0 77 0 11 0 81 0 13 0 85 0 16 0 89 0 17 0 93 0 19 0 97 0 20 0 101 0 21 0 165 0 32]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   419
#[1 0 181 0 7 0 77 0 11 0 81 0 13 0 85 0 16 0 89 0 17 0 93 0 19 0 97 0 20 0 101 0 21 0 165 0 32]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   420
#[1 0 106 0 2 0 106 0 7 0 106 0 11 0 106 0 13 0 106 0 16 0 106 0 17 0 106 0 19 0 106 0 20 0 106 0 21 0 106 0 23 0 185 0 35 0 189 0 36 0 193 0 37]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   421
#[0 0 154 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   422
#[0 0 10 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   423
#[0 0 146 0 7 0 20]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   424
#[1 0 197 0 2 0 201 0 14]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   425
#[1 0 166 0 2 0 166 0 10 0 77 0 11 0 166 0 12 0 81 0 13 0 166 0 14 0 85 0 16 0 89 0 17 0 93 0 19 0 97 0 20 0 101 0 21 0 205 0 32]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   426
#[1 0 197 0 2 0 209 0 10]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   427
#[1 0 197 0 2 0 213 0 12]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   428
#[0 0 86 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   429
#[0 0 18 0 7 0 11 0 13 0 16 0 17 0 19 0 20 0 21]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   430
#[0 0 6 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   431
#[0 0 162 0 7 0 19]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   432
#[0 0 198 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   433
#[0 0 26 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   434
#[1 0 217 0 2 0 221 0 7]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   435
#[0 0 94 0 2 0 7]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   436
#[1 0 98 0 2 0 98 0 7 0 77 0 11 0 81 0 13 0 85 0 16 0 89 0 17 0 93 0 19 0 97 0 20 0 101 0 21 0 225 0 23 0 229 0 32]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   437
#[1 0 174 0 2 0 174 0 10 0 174 0 11 0 174 0 12 0 174 0 13 0 174 0 14 0 174 0 16 0 174 0 17 0 174 0 19 0 174 0 20 0 174 0 21 0 233 0 42]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   438
#[0 0 78 0 2 0 5 0 7 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 19 0 20 0 21 0 23 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   439
#[1 0 178 0 2 0 237 0 5 0 241 0 9 0 178 0 10 0 178 0 11 0 178 0 12 0 178 0 13 0 178 0 14 0 245 0 15 0 178 0 16 0 178 0 17 0 178 0 19 0 178 0 20 0 178 0 21]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   440
#[0 0 74 0 2 0 5 0 7 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 19 0 20 0 21 0 23 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   441
#[0 0 70 0 2 0 5 0 7 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 19 0 20 0 21 0 23 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   442
#[1 0 106 0 2 0 106 0 7 0 106 0 11 0 106 0 13 0 106 0 16 0 106 0 17 0 106 0 19 0 106 0 20 0 106 0 21 0 106 0 23 0 249 0 36 0 193 0 37]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   443
#[0 0 22 0 1 0 3 0 4 0 6 0 8 0 20 0 43]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   444
#[0 0 102 0 2 0 7]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   445
#[1 0 110 0 2 0 253 0 5 0 110 0 7 1 1 0 9 0 110 0 11 0 110 0 13 1 5 0 15 0 110 0 16 0 110 0 17 0 110 0 19 0 110 0 20 0 110 0 21 0 110 0 23 1 9 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   446
#[1 0 170 0 2 0 170 0 10 0 77 0 11 0 170 0 12 0 81 0 13 0 170 0 14 0 85 0 16 0 89 0 17 0 93 0 19 0 97 0 20 0 101 0 21 0 205 0 32]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   447
#[0 0 182 0 2 0 10 0 11 0 12 0 13 0 14 0 16 0 17 0 19 0 20 0 21]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   448
#[0 0 186 0 2 0 10 0 11 0 12 0 13 0 14 0 16 0 17 0 19 0 20 0 21]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   449
#[0 0 190 0 2 0 10 0 11 0 12 0 13 0 14 0 16 0 17 0 19 0 20 0 21]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   450
#[0 0 90 0 2 0 7]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   451
#[1 0 118 0 2 0 118 0 7 0 118 0 11 0 118 0 13 0 118 0 16 0 118 0 17 0 118 0 19 0 118 0 20 0 118 0 21 0 118 0 23 1 13 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   452
#[1 0 126 0 2 0 126 0 7 0 126 0 11 0 126 0 13 0 126 0 16 0 126 0 17 0 126 0 19 0 126 0 20 0 126 0 21 0 126 0 23 1 17 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   453
#[1 0 134 0 2 0 134 0 7 0 134 0 11 0 134 0 13 0 134 0 16 0 134 0 17 0 134 0 19 0 134 0 20 0 134 0 21 0 134 0 23 1 21 0 24]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   454
#[0 0 114 0 2 0 7 0 11 0 13 0 16 0 17 0 19 0 20 0 21 0 23]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   455
#[0 0 122 0 2 0 7 0 11 0 13 0 16 0 17 0 19 0 20 0 21 0 23]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   456
#[0 0 130 0 2 0 7 0 11 0 13 0 16 0 17 0 19 0 20 0 21 0 23]
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   457
#[0 0 138 0 2 0 7 0 11 0 13 0 16 0 17 0 19 0 20 0 21 0 23]
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   458
)
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   459
! !
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   460
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   461
!SmaCCGrammarParser methodsFor:'initialize-release'!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   462
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   463
initialize
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   464
	super initialize.
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   465
	grammar := SmaCCGrammar new
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   466
! !
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   467
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   468
!SmaCCGrammarParser methodsFor:'private'!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   469
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   470
verifyCodeToken: codeToken for: aRHS 
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   471
	| code |
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   472
	code := codeToken value copyFrom: 2 to: codeToken value size - 1.
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   473
	RBParser parseExpression: code
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   474
		onError: 
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   475
			[:string :position | 
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   476
			currentToken := nil.
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   477
			scanner position: codeToken startPosition + position.
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   478
			self reportErrorMessage: string].
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   479
	aRHS reduceAction: code.
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   480
	^aRHS
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   481
! !
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   482
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   483
!SmaCCGrammarParser class methodsFor:'documentation'!
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   484
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   485
version
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   486
    ^ '$Header: /opt/data/cvs/stx/goodies/smaCC/SmaCC__SmaCCGrammarParser.st,v 1.1 2006-02-09 21:18:56 vranyj1 Exp $'
14
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   487
!
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   488
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   489
version_SVN
76468a870e05 Grammar parser recompiled to support comments
vranyj1
parents: 1
diff changeset
   490
    ^ '$Id$'
1
b8cca2663544 Initial import
vranyj1
parents:
diff changeset
   491
! !