devtools/PPCompositeParserGenerator.st
changeset 100 998b9fb92a06
child 124 fc28ffa9eb82
equal deleted inserted replaced
99:57b4439a7998 100:998b9fb92a06
       
     1 "{ Package: 'stx:goodies/petitparser/devtools' }"
       
     2 
       
     3 Object subclass:#PPCompositeParserGenerator
       
     4 	instanceVariableNames:'productions klass changeset'
       
     5 	classVariableNames:''
       
     6 	poolDictionaries:''
       
     7 	category:'PetitParser-Utils'
       
     8 !
       
     9 
       
    10 
       
    11 !PPCompositeParserGenerator methodsFor:'accessing'!
       
    12 
       
    13 changeset
       
    14     ^ changeset
       
    15 !
       
    16 
       
    17 klass
       
    18     ^ klass
       
    19 !
       
    20 
       
    21 klass:something
       
    22     klass := something.
       
    23 !
       
    24 
       
    25 productions
       
    26     ^ productions
       
    27 !
       
    28 
       
    29 productions:something
       
    30     productions := something.
       
    31 ! !
       
    32 
       
    33 !PPCompositeParserGenerator methodsFor:'generating'!
       
    34 
       
    35 generate
       
    36     | instvars classchange |
       
    37 
       
    38     changeset := ChangeSet fromStream: Dart::Parser definition readStream.
       
    39     classchange := changeset anElement.
       
    40     classchange setupFromSource.
       
    41 
       
    42     instvars := productions keys.
       
    43     instvars add: classchange instanceVariableNames.
       
    44     classchange instanceVariableNames: (instvars asSortedCollection  asStringWith:' ').
       
    45 
       
    46 
       
    47     productions do:[:p|
       
    48 
       
    49     ].
       
    50 
       
    51     "Created: / 10-01-2013 / 12:57:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    52 ! !
       
    53 
       
    54 !PPCompositeParserGenerator class methodsFor:'documentation'!
       
    55 
       
    56 version
       
    57     ^ '$Header: /cvs/stx/stx/goodies/petitparser/devtools/PPCompositeParserGenerator.st,v 1.1 2013-01-10 13:22:22 vrany Exp $'
       
    58 !
       
    59 
       
    60 version_CVS
       
    61     ^ '$Header: /cvs/stx/stx/goodies/petitparser/devtools/PPCompositeParserGenerator.st,v 1.1 2013-01-10 13:22:22 vrany Exp $'
       
    62 ! !