devtools/PPDebuggingParser.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 05 May 2012 16:52:08 +0200
changeset 86 824b59ebcbbd
parent 76 3a7ad5256cd9
child 99 57b4439a7998
permissions -rw-r--r--
initial checkin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
76
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/petitparser/devtools' }"
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
PPParser subclass:#PPDebuggingParser
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
	instanceVariableNames:'parser debugger'
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
	classVariableNames:''
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	poolDictionaries:''
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	category:'PetitParser-Debugging'
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
!PPDebuggingParser class methodsFor:'instance creation'!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
parser: parser debugger: debugger
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
    ^self new parser: parser; debugger: debugger
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
    "Created: / 12-03-2012 / 16:47:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
! !
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
!PPDebuggingParser methodsFor:'accessing'!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
debugger
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
    ^ debugger
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
debugger:aPPDebugger
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
    debugger := aPPDebugger.
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
parser
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
    ^ parser
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
parser:aPPParser
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
    parser := aPPParser.
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
! !
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
!PPDebuggingParser methodsFor:'parsing'!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
parseOn:aStream
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
    | result |
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
    debugger enterParser: parser stream: aStream.
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
    result := parser parseOn: aStream.
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
    debugger leaveParser: parser stream: aStream result: result.
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
    ^result.
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
    "Modified: / 12-03-2012 / 16:41:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
! !
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
!PPDebuggingParser class methodsFor:'documentation'!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
version
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
    ^ '$Header: /cvs/stx/stx/goodies/petitparser/devtools/PPDebuggingParser.st,v 1.1 2012-05-05 14:49:17 vrany Exp $'
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
version_CVS
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
    ^ '$Header: /cvs/stx/stx/goodies/petitparser/devtools/PPDebuggingParser.st,v 1.1 2012-05-05 14:49:17 vrany Exp $'
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
!
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
version_SVN
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
    ^ '§Id: PPDebuggingParser.st 10 2012-05-04 18:54:13Z vranyj1 §'
3a7ad5256cd9 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
! !