compiler/PPCLL1Visitor.st
changeset 459 4751c407bb40
parent 452 9f4558b3be66
equal deleted inserted replaced
452:9f4558b3be66 459:4751c407bb40
    18         (self startsWithToken: child) ifFalse: [ ^ false ].
    18         (self startsWithToken: child) ifFalse: [ ^ false ].
    19         firsts addAll: child firstSetWithTokens.
    19         firsts addAll: child firstSetWithTokens.
    20     ].
    20     ].
    21     (firsts asIdentitySet size = firsts size) ifFalse: [ ^ false ].
    21     (firsts asIdentitySet size = firsts size) ifFalse: [ ^ false ].
    22 
    22 
    23     firsts allPairsDo: [ :e1 :e2 | 
    23     firsts do:[:e1 |
    24         e1 == e2 ifFalse: [
    24         firsts do:[:e2 |     
    25             (e1 overlapsWith: e2) ifTrue: [ ^ false ] ].
    25             e1 == e2 ifFalse: [
       
    26                 (e1 overlapsWith: e2) ifTrue: [ ^ false ] ].
       
    27         ].
    26     ].
    28     ].
    27     ^ true
    29     ^ true
       
    30 
       
    31     "Modified: / 10-05-2015 / 07:27:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    28 !
    32 !
    29 
    33 
    30 startsWithToken: node
    34 startsWithToken: node
    31     | firstSet terminal total |
    35     | firstSet terminal total |
    32     total := 0.
    36     total := 0.