Cface__CDefinitionScanner.st
changeset 1 b6c0180314d1
child 3 110a9cbf8594
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Cface__CDefinitionScanner.st	Tue May 27 18:55:24 2008 +0000
@@ -0,0 +1,1781 @@
+"{ Package: 'cvut:fel/cface' }"
+
+"{ NameSpace: Cface }"
+
+SmaCC::SmaCCScanner subclass:#CDefinitionScanner
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Cface-Parser'
+!
+
+
+!CDefinitionScanner class methodsFor:'accessing'!
+
+needsLineNumbers
+
+    ^true
+
+    "Created: / 10-02-2008 / 10:17:03 / janfrog"
+! !
+
+!CDefinitionScanner class methodsFor:'generated-comments'!
+
+scannerDefinitionComment
+
+	"<name>                  :   [a-zA-Z_] \w*   ;
+<number>        :   \-? [0-9]+ [a-zA-Z]* ;
+
+<whitespace>    :       \s+     ;
+
+<file>                  :       [\w-_/] [\w-_/.]* ;
+"
+
+    "Modified: / 17-02-2008 / 18:45:28 / janfrog"
+! !
+
+!CDefinitionScanner class methodsFor:'generated-initialization'!
+
+initializeKeywordMap
+    keywordMap := Dictionary new.
+    #( #(27 'argument' 5)
+     #(27 'array' 26)
+     #(27 'char' 14)
+     #(27 'const' 25)
+     #(27 'double' 20)
+     #(27 'enum' 17)
+     #(27 'field' 16)
+     #(27 'float' 22)
+     #(27 'function' 11)
+     #(27 'int' 13)
+     #(27 'long' 3)
+     #(27 'return' 6)
+     #(27 'short' 4)
+     #(27 'struct' 21)
+     #(27 'typedef' 7)
+     #(27 'union' 15)
+     #(27 'unsigned' 2)
+     #(27 'value' 18)
+     #(27 'void' 24)
+     #(30 'argument' 5)
+     #(30 'array' 26)
+     #(30 'char' 14)
+     #(30 'const' 25)
+     #(30 'double' 20)
+     #(30 'enum' 17)
+     #(30 'field' 16)
+     #(30 'float' 22)
+     #(30 'function' 11)
+     #(30 'int' 13)
+     #(30 'long' 3)
+     #(30 'return' 6)
+     #(30 'short' 4)
+     #(30 'struct' 21)
+     #(30 'typedef' 7)
+     #(30 'union' 15)
+     #(30 'unsigned' 2)
+     #(30 'value' 18)
+     #(30 'void' 24) ) 
+            do:[:each | 
+                (keywordMap at:each first ifAbsentPut:[ Dictionary new ]) at:(each at:2)
+                    put:each last
+            ].
+    ^ keywordMap
+
+    "Modified: / 17-02-2008 / 18:45:28 / janfrog"
+! !
+
+!CDefinitionScanner methodsFor:'generated-scanner'!
+
+scan1
+    [
+        self recordMatch:#( 27 30 ).
+        self step.
+        (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ])
+    ] whileTrue.
+    (currentCharacter between:$- and:$/) ifTrue:[
+        [
+            self recordMatch:#( 30 ).
+            self step.
+            (currentCharacter isLetterOrDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+        ] whileTrue.
+        ^ self reportLastMatch
+    ].
+    ^ self reportLastMatch
+
+    "Modified: / 17-02-2008 / 18:45:28 / janfrog"
+!
+
+scan2
+    [
+        self recordMatch:#( 28 30 ).
+        self step.
+        (currentCharacter isLetter) ifTrue:[
+            [
+                self recordMatch:#( 28 30 ).
+                self step.
+                (currentCharacter isLetter)
+            ] whileTrue.
+            (currentCharacter isXMLDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ]) 
+                    ifTrue:[
+                        [
+                            self recordMatch:#( 30 ).
+                            self step.
+                            (currentCharacter isLetterOrDigit 
+                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                        ] whileTrue.
+                        ^ self reportLastMatch
+                    ].
+            ^ self reportLastMatch
+        ].
+        (currentCharacter isXMLDigit)
+    ] whileTrue.
+    ((currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ]) ifTrue:[
+        [
+            self recordMatch:#( 30 ).
+            self step.
+            (currentCharacter isLetterOrDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+        ] whileTrue.
+        ^ self reportLastMatch
+    ].
+    ^ self reportLastMatch
+
+    "Modified: / 17-02-2008 / 18:45:28 / janfrog"
+!
+
+scan3
+    [
+        self recordMatch:#( 30 32 ).
+        self step.
+        (currentCharacter isLetter) ifTrue:[
+            [
+                self recordMatch:#( 30 32 ).
+                self step.
+                (currentCharacter isLetter)
+            ] whileTrue.
+            (currentCharacter isXMLDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ]) 
+                    ifTrue:[
+                        [
+                            self recordMatch:#( 32 ).
+                            self step.
+                            (currentCharacter isLetterOrDigit 
+                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                        ] whileTrue.
+                        ^ self reportLastMatch
+                    ].
+            ^ self reportLastMatch
+        ].
+        (currentCharacter isXMLDigit)
+    ] whileTrue.
+    ((currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ]) ifTrue:[
+        [
+            self recordMatch:#( 32 ).
+            self step.
+            (currentCharacter isLetterOrDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+        ] whileTrue.
+        ^ self reportLastMatch
+    ].
+    ^ self reportLastMatch
+
+    "Modified: / 12-02-2008 / 23:05:21 / janfrog"
+!
+
+scan4
+    self recordMatch:#( 29 32 ).
+    self step.
+    ((currentCharacter between:$0 and:$9) 
+        or:[
+            (currentCharacter between:$A and:$Z) 
+                or:[
+                    currentCharacter == $_ 
+                        or:[
+                            (currentCharacter between:$a and:$o) 
+                                or:[ (currentCharacter between:$q and:$z) ]
+                        ]
+                ]
+        ]) 
+            ifTrue:[
+                [
+                    self recordMatch:#( 29 32 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ])
+                ] whileTrue.
+                (currentCharacter between:$- and:$/) ifTrue:[
+                    [
+                        self recordMatch:#( 32 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit 
+                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                    ] whileTrue.
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+    (currentCharacter between:$- and:$/) ifTrue:[
+        [
+            self recordMatch:#( 32 ).
+            self step.
+            (currentCharacter isLetterOrDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+        ] whileTrue.
+        ^ self reportLastMatch
+    ].
+    (currentCharacter == $p) ifTrue:[
+        ^ self scan5
+    ].
+    ^ self reportLastMatch
+
+    "Modified: / 12-02-2008 / 23:05:21 / janfrog"
+!
+
+scan5
+    self recordMatch:#( 29 32 ).
+    self step.
+    (currentCharacter isXMLDigit 
+        or:[
+            (currentCharacter between:$A and:$Z) 
+                or:[
+                    currentCharacter == $_ 
+                        or:[
+                            (currentCharacter between:$a and:$d) 
+                                or:[ (currentCharacter between:$f and:$z) ]
+                        ]
+                ]
+        ]) 
+            ifTrue:[
+                [
+                    self recordMatch:#( 29 32 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ])
+                ] whileTrue.
+                (currentCharacter between:$- and:$/) ifTrue:[
+                    [
+                        self recordMatch:#( 32 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit 
+                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                    ] whileTrue.
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+    (currentCharacter between:$- and:$/) ifTrue:[
+        [
+            self recordMatch:#( 32 ).
+            self step.
+            (currentCharacter isLetterOrDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+        ] whileTrue.
+        ^ self reportLastMatch
+    ].
+    (currentCharacter == $e) ifTrue:[
+        ^ self scan6
+    ].
+    ^ self reportLastMatch
+
+    "Modified: / 12-02-2008 / 23:05:21 / janfrog"
+!
+
+scan6
+    self recordMatch:#( 29 32 ).
+    self step.
+    ((currentCharacter between:$0 and:$9) 
+        or:[
+            (currentCharacter between:$A and:$Z) 
+                or:[
+                    currentCharacter == $_ 
+                        or:[
+                            (currentCharacter between:$a and:$c) 
+                                or:[ (currentCharacter between:$e and:$z) ]
+                        ]
+                ]
+        ]) 
+            ifTrue:[
+                [
+                    self recordMatch:#( 29 32 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ])
+                ] whileTrue.
+                (currentCharacter between:$- and:$/) ifTrue:[
+                    [
+                        self recordMatch:#( 32 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit 
+                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                    ] whileTrue.
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+    (currentCharacter between:$- and:$/) ifTrue:[
+        [
+            self recordMatch:#( 32 ).
+            self step.
+            (currentCharacter isLetterOrDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+        ] whileTrue.
+        ^ self reportLastMatch
+    ].
+    (currentCharacter == $d) ifTrue:[
+        ^ self scan7
+    ].
+    ^ self reportLastMatch
+
+    "Modified: / 12-02-2008 / 23:05:21 / janfrog"
+!
+
+scan7
+    self recordMatch:#( 29 32 ).
+    self step.
+    (currentCharacter isXMLDigit 
+        or:[
+            (currentCharacter between:$A and:$Z) 
+                or:[
+                    currentCharacter == $_ 
+                        or:[
+                            (currentCharacter between:$a and:$d) 
+                                or:[ (currentCharacter between:$f and:$z) ]
+                        ]
+                ]
+        ]) 
+            ifTrue:[
+                [
+                    self recordMatch:#( 29 32 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ])
+                ] whileTrue.
+                (currentCharacter between:$- and:$/) ifTrue:[
+                    [
+                        self recordMatch:#( 32 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit 
+                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                    ] whileTrue.
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+    (currentCharacter between:$- and:$/) ifTrue:[
+        [
+            self recordMatch:#( 32 ).
+            self step.
+            (currentCharacter isLetterOrDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+        ] whileTrue.
+        ^ self reportLastMatch
+    ].
+    (currentCharacter == $e) ifTrue:[
+        self recordMatch:#( 29 32 ).
+        self step.
+        ((currentCharacter between:$0 and:$9) 
+            or:[
+                (currentCharacter between:$A and:$Z) 
+                    or:[
+                        currentCharacter == $_ 
+                            or:[
+                                (currentCharacter between:$a and:$e) 
+                                    or:[ (currentCharacter between:$g and:$z) ]
+                            ]
+                    ]
+            ]) 
+                ifTrue:[
+                    [
+                        self recordMatch:#( 29 32 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ])
+                    ] whileTrue.
+                    (currentCharacter between:$- and:$/) ifTrue:[
+                        [
+                            self recordMatch:#( 32 ).
+                            self step.
+                            (currentCharacter isLetterOrDigit 
+                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                        ] whileTrue.
+                        ^ self reportLastMatch
+                    ].
+                    ^ self reportLastMatch
+                ].
+        (currentCharacter between:$- and:$/) ifTrue:[
+            [
+                self recordMatch:#( 32 ).
+                self step.
+                (currentCharacter isLetterOrDigit 
+                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+            ] whileTrue.
+            ^ self reportLastMatch
+        ].
+        (currentCharacter == $f) ifTrue:[
+            self recordMatch:#( 29 32 ).
+            self step.
+            (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ]) ifTrue:[
+                [
+                    self recordMatch:#( 29 32 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ])
+                ] whileTrue.
+                (currentCharacter between:$- and:$/) ifTrue:[
+                    [
+                        self recordMatch:#( 32 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit 
+                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                    ] whileTrue.
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+            (currentCharacter between:$. and:$/) ifTrue:[
+                [
+                    self recordMatch:#( 32 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit 
+                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                ] whileTrue.
+                ^ self reportLastMatch
+            ].
+            (currentCharacter == $-) ifTrue:[
+                self recordMatch:#( 32 ).
+                self step.
+                (currentCharacter isXMLDigit 
+                    or:[
+                        (currentCharacter between:$- and:$/) 
+                            or:[
+                                (currentCharacter between:$A and:$Z) 
+                                    or:[
+                                        currentCharacter == $_ 
+                                            or:[
+                                                (currentCharacter between:$a and:$d) 
+                                                    or:[
+                                                        (currentCharacter between:$f and:$r) 
+                                                            or:[ currentCharacter == $t or:[ (currentCharacter between:$v and:$z) ] ]
+                                                    ]
+                                            ]
+                                    ]
+                            ]
+                    ]) 
+                        ifTrue:[
+                            [
+                                self recordMatch:#( 32 ).
+                                self step.
+                                (currentCharacter isLetterOrDigit 
+                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                            ] whileTrue.
+                            ^ self reportLastMatch
+                        ].
+                (currentCharacter == $e) ifTrue:[
+                    self recordMatch:#( 32 ).
+                    self step.
+                    ((currentCharacter between:$- and:$9) 
+                        or:[
+                            (currentCharacter between:$A and:$Z) 
+                                or:[
+                                    currentCharacter == $_ 
+                                        or:[
+                                            (currentCharacter between:$a and:$m) 
+                                                or:[ (currentCharacter between:$o and:$z) ]
+                                        ]
+                                ]
+                        ]) 
+                            ifTrue:[
+                                [
+                                    self recordMatch:#( 32 ).
+                                    self step.
+                                    (currentCharacter isLetterOrDigit 
+                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                ] whileTrue.
+                                ^ self reportLastMatch
+                            ].
+                    (currentCharacter == $n) ifTrue:[
+                        self recordMatch:#( 32 ).
+                        self step.
+                        (currentCharacter isXMLDigit 
+                            or:[
+                                (currentCharacter between:$- and:$/) 
+                                    or:[
+                                        (currentCharacter between:$A and:$Z) 
+                                            or:[
+                                                currentCharacter == $_ 
+                                                    or:[
+                                                        (currentCharacter between:$a and:$t) 
+                                                            or:[ (currentCharacter between:$v and:$z) ]
+                                                    ]
+                                            ]
+                                    ]
+                            ]) 
+                                ifTrue:[
+                                    [
+                                        self recordMatch:#( 32 ).
+                                        self step.
+                                        (currentCharacter isLetterOrDigit 
+                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                    ] whileTrue.
+                                    ^ self reportLastMatch
+                                ].
+                        (currentCharacter == $u) ifTrue:[
+                            self recordMatch:#( 32 ).
+                            self step.
+                            ((currentCharacter between:$- and:$9) 
+                                or:[
+                                    (currentCharacter between:$A and:$Z) 
+                                        or:[
+                                            currentCharacter == $_ 
+                                                or:[
+                                                    (currentCharacter between:$a and:$l) 
+                                                        or:[ (currentCharacter between:$n and:$z) ]
+                                                ]
+                                        ]
+                                ]) 
+                                    ifTrue:[
+                                        [
+                                            self recordMatch:#( 32 ).
+                                            self step.
+                                            (currentCharacter isLetterOrDigit 
+                                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                        ] whileTrue.
+                                        ^ self reportLastMatch
+                                    ].
+                            (currentCharacter == $m) ifTrue:[
+                                self recordMatch:#( 18 32 ).
+                                self step.
+                                (currentCharacter isLetterOrDigit 
+                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ]) 
+                                        ifTrue:[
+                                            [
+                                                self recordMatch:#( 32 ).
+                                                self step.
+                                                (currentCharacter isLetterOrDigit 
+                                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                            ] whileTrue.
+                                            ^ self reportLastMatch
+                                        ].
+                                ^ self reportLastMatch
+                            ].
+                            ^ self reportLastMatch
+                        ].
+                        ^ self reportLastMatch
+                    ].
+                    ^ self reportLastMatch
+                ].
+                (currentCharacter == $s) ifTrue:[
+                    self recordMatch:#( 32 ).
+                    self step.
+                    ((currentCharacter between:$- and:$9) 
+                        or:[
+                            (currentCharacter between:$A and:$Z) 
+                                or:[
+                                    currentCharacter == $_ 
+                                        or:[
+                                            (currentCharacter between:$a and:$s) 
+                                                or:[ (currentCharacter between:$u and:$z) ]
+                                        ]
+                                ]
+                        ]) 
+                            ifTrue:[
+                                [
+                                    self recordMatch:#( 32 ).
+                                    self step.
+                                    (currentCharacter isLetterOrDigit 
+                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                ] whileTrue.
+                                ^ self reportLastMatch
+                            ].
+                    (currentCharacter == $t) ifTrue:[
+                        self recordMatch:#( 32 ).
+                        self step.
+                        ((currentCharacter between:$- and:$9) 
+                            or:[
+                                (currentCharacter between:$A and:$Z) 
+                                    or:[
+                                        currentCharacter == $_ 
+                                            or:[
+                                                (currentCharacter between:$a and:$q) 
+                                                    or:[ (currentCharacter between:$s and:$z) ]
+                                            ]
+                                    ]
+                            ]) 
+                                ifTrue:[
+                                    [
+                                        self recordMatch:#( 32 ).
+                                        self step.
+                                        (currentCharacter isLetterOrDigit 
+                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                    ] whileTrue.
+                                    ^ self reportLastMatch
+                                ].
+                        (currentCharacter == $r) ifTrue:[
+                            self recordMatch:#( 32 ).
+                            self step.
+                            (currentCharacter isXMLDigit 
+                                or:[
+                                    (currentCharacter between:$- and:$/) 
+                                        or:[
+                                            (currentCharacter between:$A and:$Z) 
+                                                or:[
+                                                    currentCharacter == $_ 
+                                                        or:[
+                                                            (currentCharacter between:$a and:$t) 
+                                                                or:[ (currentCharacter between:$v and:$z) ]
+                                                        ]
+                                                ]
+                                        ]
+                                ]) 
+                                    ifTrue:[
+                                        [
+                                            self recordMatch:#( 32 ).
+                                            self step.
+                                            (currentCharacter isLetterOrDigit 
+                                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                        ] whileTrue.
+                                        ^ self reportLastMatch
+                                    ].
+                            (currentCharacter == $u) ifTrue:[
+                                self recordMatch:#( 32 ).
+                                self step.
+                                ((currentCharacter between:$- and:$9) 
+                                    or:[
+                                        (currentCharacter between:$A and:$Z) 
+                                            or:[
+                                                currentCharacter == $_ 
+                                                    or:[
+                                                        (currentCharacter between:$a and:$b) 
+                                                            or:[ (currentCharacter between:$d and:$z) ]
+                                                    ]
+                                            ]
+                                    ]) 
+                                        ifTrue:[
+                                            [
+                                                self recordMatch:#( 32 ).
+                                                self step.
+                                                (currentCharacter isLetterOrDigit 
+                                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                            ] whileTrue.
+                                            ^ self reportLastMatch
+                                        ].
+                                (currentCharacter == $c) ifTrue:[
+                                    self recordMatch:#( 32 ).
+                                    self step.
+                                    ((currentCharacter between:$- and:$9) 
+                                        or:[
+                                            (currentCharacter between:$A and:$Z) 
+                                                or:[
+                                                    currentCharacter == $_ 
+                                                        or:[
+                                                            (currentCharacter between:$a and:$s) 
+                                                                or:[ (currentCharacter between:$u and:$z) ]
+                                                        ]
+                                                ]
+                                        ]) 
+                                            ifTrue:[
+                                                [
+                                                    self recordMatch:#( 32 ).
+                                                    self step.
+                                                    (currentCharacter isLetterOrDigit 
+                                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                ] whileTrue.
+                                                ^ self reportLastMatch
+                                            ].
+                                    (currentCharacter == $t) ifTrue:[
+                                        self recordMatch:#( 28 32 ).
+                                        self step.
+                                        (currentCharacter isLetterOrDigit 
+                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ]) 
+                                                ifTrue:[
+                                                    [
+                                                        self recordMatch:#( 32 ).
+                                                        self step.
+                                                        (currentCharacter isLetterOrDigit 
+                                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                    ] whileTrue.
+                                                    ^ self reportLastMatch
+                                                ].
+                                        ^ self reportLastMatch
+                                    ].
+                                    ^ self reportLastMatch
+                                ].
+                                ^ self reportLastMatch
+                            ].
+                            ^ self reportLastMatch
+                        ].
+                        ^ self reportLastMatch
+                    ].
+                    ^ self reportLastMatch
+                ].
+                (currentCharacter == $u) ifTrue:[
+                    self recordMatch:#( 32 ).
+                    self step.
+                    ((currentCharacter between:$- and:$9) 
+                        or:[
+                            (currentCharacter between:$A and:$Z) 
+                                or:[
+                                    currentCharacter == $_ 
+                                        or:[
+                                            (currentCharacter between:$a and:$m) 
+                                                or:[ (currentCharacter between:$o and:$z) ]
+                                        ]
+                                ]
+                        ]) 
+                            ifTrue:[
+                                [
+                                    self recordMatch:#( 32 ).
+                                    self step.
+                                    (currentCharacter isLetterOrDigit 
+                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                ] whileTrue.
+                                ^ self reportLastMatch
+                            ].
+                    (currentCharacter == $n) ifTrue:[
+                        self recordMatch:#( 32 ).
+                        self step.
+                        (currentCharacter isXMLDigit 
+                            or:[
+                                (currentCharacter between:$- and:$/) 
+                                    or:[
+                                        (currentCharacter between:$A and:$Z) 
+                                            or:[
+                                                currentCharacter == $_ 
+                                                    or:[
+                                                        (currentCharacter between:$a and:$h) 
+                                                            or:[ (currentCharacter between:$j and:$z) ]
+                                                    ]
+                                            ]
+                                    ]
+                            ]) 
+                                ifTrue:[
+                                    [
+                                        self recordMatch:#( 32 ).
+                                        self step.
+                                        (currentCharacter isLetterOrDigit 
+                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                    ] whileTrue.
+                                    ^ self reportLastMatch
+                                ].
+                        (currentCharacter == $i) ifTrue:[
+                            self recordMatch:#( 32 ).
+                            self step.
+                            (currentCharacter isXMLDigit 
+                                or:[
+                                    (currentCharacter between:$- and:$/) 
+                                        or:[
+                                            (currentCharacter between:$A and:$Z) 
+                                                or:[
+                                                    currentCharacter == $_ 
+                                                        or:[
+                                                            (currentCharacter between:$a and:$n) 
+                                                                or:[ (currentCharacter between:$p and:$z) ]
+                                                        ]
+                                                ]
+                                        ]
+                                ]) 
+                                    ifTrue:[
+                                        [
+                                            self recordMatch:#( 32 ).
+                                            self step.
+                                            (currentCharacter isLetterOrDigit 
+                                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                        ] whileTrue.
+                                        ^ self reportLastMatch
+                                    ].
+                            (currentCharacter == $o) ifTrue:[
+                                self recordMatch:#( 32 ).
+                                self step.
+                                ((currentCharacter between:$- and:$9) 
+                                    or:[
+                                        (currentCharacter between:$A and:$Z) 
+                                            or:[
+                                                currentCharacter == $_ 
+                                                    or:[
+                                                        (currentCharacter between:$a and:$m) 
+                                                            or:[ (currentCharacter between:$o and:$z) ]
+                                                    ]
+                                            ]
+                                    ]) 
+                                        ifTrue:[
+                                            [
+                                                self recordMatch:#( 32 ).
+                                                self step.
+                                                (currentCharacter isLetterOrDigit 
+                                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                            ] whileTrue.
+                                            ^ self reportLastMatch
+                                        ].
+                                (currentCharacter == $n) ifTrue:[
+                                    self recordMatch:#( 21 32 ).
+                                    self step.
+                                    (currentCharacter isLetterOrDigit 
+                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ]) 
+                                            ifTrue:[
+                                                [
+                                                    self recordMatch:#( 32 ).
+                                                    self step.
+                                                    (currentCharacter isLetterOrDigit 
+                                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                ] whileTrue.
+                                                ^ self reportLastMatch
+                                            ].
+                                    ^ self reportLastMatch
+                                ].
+                                ^ self reportLastMatch
+                            ].
+                            ^ self reportLastMatch
+                        ].
+                        ^ self reportLastMatch
+                    ].
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+            ^ self reportLastMatch
+        ].
+        ^ self reportLastMatch
+    ].
+    ^ self reportLastMatch
+
+    "Modified: / 12-02-2008 / 23:05:21 / janfrog"
+!
+
+scanForToken
+    self step.
+    ((currentCharacter between:$A and:$Z) 
+        or:[
+            currentCharacter == $_ 
+                or:[
+                    (currentCharacter between:$a and:$e) 
+                        or:[
+                            (currentCharacter between:$g and:$o) 
+                                or:[ (currentCharacter between:$q and:$z) ]
+                        ]
+                ]
+        ]) 
+            ifTrue:[ ^ self scan1 ].
+    (currentCharacter isXMLDigit) ifTrue:[
+        ^ self scan2
+    ].
+    (currentCharacter isSeparator 
+        or:[ currentCharacter == (Character value:16rB) ]) 
+            ifTrue:[
+                [
+                    self recordMatch:#whitespace.
+                    self step.
+                    (currentCharacter isSeparator 
+                        or:[ currentCharacter == (Character value:16rB) ])
+                ] whileTrue.
+                ^ self reportLastMatch
+            ].
+    (currentCharacter == $#) ifTrue:[
+        self step.
+        (currentCharacter == $G) ifTrue:[
+            self step.
+            (currentCharacter == $e) ifTrue:[
+                self step.
+                (currentCharacter == $n) ifTrue:[
+                    self step.
+                    (currentCharacter == $e) ifTrue:[
+                        self step.
+                        (currentCharacter == $r) ifTrue:[
+                            self step.
+                            (currentCharacter == $a) ifTrue:[
+                                self step.
+                                (currentCharacter == $t) ifTrue:[
+                                    self step.
+                                    (currentCharacter == $e) ifTrue:[
+                                        self step.
+                                        (currentCharacter == $d) ifTrue:[
+                                            ^ self recordAndReportMatch:#( 8 ).
+                                        ].
+                                        ^ self reportLastMatch
+                                    ].
+                                    ^ self reportLastMatch
+                                ].
+                                ^ self reportLastMatch
+                            ].
+                            ^ self reportLastMatch
+                        ].
+                        ^ self reportLastMatch
+                    ].
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+            ^ self reportLastMatch
+        ].
+        ^ self reportLastMatch
+    ].
+    (currentCharacter == $() ifTrue:[
+        ^ self recordAndReportMatch:#( 10 ).
+    ].
+    (currentCharacter == $)) ifTrue:[
+        ^ self recordAndReportMatch:#( 12 ).
+    ].
+    (currentCharacter == $-) ifTrue:[
+        self recordMatch:#( 30 ).
+        self step.
+        ((currentCharacter between:$- and:$/) 
+            or:[
+                (currentCharacter between:$A and:$Z) 
+                    or:[
+                        currentCharacter == $_ 
+                            or:[
+                                (currentCharacter between:$a and:$e) 
+                                    or:[ (currentCharacter between:$g and:$z) ]
+                            ]
+                    ]
+            ]) 
+                ifTrue:[
+                    [
+                        self recordMatch:#( 30 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit 
+                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                    ] whileTrue.
+                    ^ self reportLastMatch
+                ].
+        (currentCharacter isXMLDigit) ifTrue:[
+            ^ self scan2
+        ].
+        (currentCharacter == $f) ifTrue:[
+            self recordMatch:#( 30 ).
+            self step.
+            (currentCharacter isXMLDigit 
+                or:[
+                    (currentCharacter between:$- and:$/) 
+                        or:[
+                            (currentCharacter between:$A and:$Z) 
+                                or:[
+                                    currentCharacter == $_ 
+                                        or:[
+                                            (currentCharacter between:$a and:$n) 
+                                                or:[ (currentCharacter between:$p and:$z) ]
+                                        ]
+                                ]
+                        ]
+                ]) 
+                    ifTrue:[
+                        [
+                            self recordMatch:#( 30 ).
+                            self step.
+                            (currentCharacter isLetterOrDigit 
+                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                        ] whileTrue.
+                        ^ self reportLastMatch
+                    ].
+            (currentCharacter == $o) ifTrue:[
+                self recordMatch:#( 30 ).
+                self step.
+                ((currentCharacter between:$- and:$9) 
+                    or:[
+                        (currentCharacter between:$A and:$Z) 
+                            or:[
+                                currentCharacter == $_ 
+                                    or:[
+                                        (currentCharacter between:$a and:$q) 
+                                            or:[ (currentCharacter between:$s and:$z) ]
+                                    ]
+                            ]
+                    ]) 
+                        ifTrue:[
+                            [
+                                self recordMatch:#( 30 ).
+                                self step.
+                                (currentCharacter isLetterOrDigit 
+                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                            ] whileTrue.
+                            ^ self reportLastMatch
+                        ].
+                (currentCharacter == $r) ifTrue:[
+                    self recordMatch:#( 30 ).
+                    self step.
+                    (currentCharacter isXMLDigit 
+                        or:[
+                            (currentCharacter between:$- and:$/) 
+                                or:[
+                                    (currentCharacter between:$A and:$Z) 
+                                        or:[
+                                            currentCharacter == $_ 
+                                                or:[
+                                                    (currentCharacter between:$a and:$d) 
+                                                        or:[ (currentCharacter between:$f and:$z) ]
+                                                ]
+                                        ]
+                                ]
+                        ]) 
+                            ifTrue:[
+                                [
+                                    self recordMatch:#( 30 ).
+                                    self step.
+                                    (currentCharacter isLetterOrDigit 
+                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                ] whileTrue.
+                                ^ self reportLastMatch
+                            ].
+                    (currentCharacter == $e) ifTrue:[
+                        self recordMatch:#( 30 ).
+                        self step.
+                        (currentCharacter isXMLDigit 
+                            or:[
+                                (currentCharacter between:$- and:$/) 
+                                    or:[
+                                        (currentCharacter between:$A and:$Z) 
+                                            or:[
+                                                currentCharacter == $_ 
+                                                    or:[
+                                                        (currentCharacter between:$a and:$h) 
+                                                            or:[ (currentCharacter between:$j and:$z) ]
+                                                    ]
+                                            ]
+                                    ]
+                            ]) 
+                                ifTrue:[
+                                    [
+                                        self recordMatch:#( 30 ).
+                                        self step.
+                                        (currentCharacter isLetterOrDigit 
+                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                    ] whileTrue.
+                                    ^ self reportLastMatch
+                                ].
+                        (currentCharacter == $i) ifTrue:[
+                            self recordMatch:#( 30 ).
+                            self step.
+                            ((currentCharacter between:$- and:$9) 
+                                or:[
+                                    (currentCharacter between:$A and:$Z) 
+                                        or:[
+                                            currentCharacter == $_ 
+                                                or:[
+                                                    (currentCharacter between:$a and:$f) 
+                                                        or:[ (currentCharacter between:$h and:$z) ]
+                                                ]
+                                        ]
+                                ]) 
+                                    ifTrue:[
+                                        [
+                                            self recordMatch:#( 30 ).
+                                            self step.
+                                            (currentCharacter isLetterOrDigit 
+                                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                        ] whileTrue.
+                                        ^ self reportLastMatch
+                                    ].
+                            (currentCharacter == $g) ifTrue:[
+                                self recordMatch:#( 30 ).
+                                self step.
+                                ((currentCharacter between:$- and:$9) 
+                                    or:[
+                                        (currentCharacter between:$A and:$Z) 
+                                            or:[
+                                                currentCharacter == $_ 
+                                                    or:[
+                                                        (currentCharacter between:$a and:$m) 
+                                                            or:[ (currentCharacter between:$o and:$z) ]
+                                                    ]
+                                            ]
+                                    ]) 
+                                        ifTrue:[
+                                            [
+                                                self recordMatch:#( 30 ).
+                                                self step.
+                                                (currentCharacter isLetterOrDigit 
+                                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                            ] whileTrue.
+                                            ^ self reportLastMatch
+                                        ].
+                                (currentCharacter == $n) ifTrue:[
+                                    self recordMatch:#( 19 30 ).
+                                    self step.
+                                    (currentCharacter isLetterOrDigit 
+                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ]) 
+                                            ifTrue:[
+                                                [
+                                                    self recordMatch:#( 30 ).
+                                                    self step.
+                                                    (currentCharacter isLetterOrDigit 
+                                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                ] whileTrue.
+                                                ^ self reportLastMatch
+                                            ].
+                                    ^ self reportLastMatch
+                                ].
+                                ^ self reportLastMatch
+                            ].
+                            ^ self reportLastMatch
+                        ].
+                        ^ self reportLastMatch
+                    ].
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+            ^ self reportLastMatch
+        ].
+        ^ self reportLastMatch
+    ].
+    (currentCharacter == $/) ifTrue:[
+        [
+            self recordMatch:#( 30 ).
+            self step.
+            (currentCharacter isLetterOrDigit 
+                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+        ] whileTrue.
+        ^ self reportLastMatch
+    ].
+    (currentCharacter == $f) ifTrue:[
+        self recordMatch:#( 27 30 ).
+        self step.
+        (currentCharacter isXMLDigit 
+            or:[
+                (currentCharacter between:$A and:$Z) 
+                    or:[
+                        currentCharacter == $_ 
+                            or:[
+                                (currentCharacter between:$a and:$q) 
+                                    or:[
+                                        (currentCharacter between:$s and:$t) 
+                                            or:[ (currentCharacter between:$v and:$z) ]
+                                    ]
+                            ]
+                    ]
+            ]) 
+                ifTrue:[ ^ self scan1 ].
+        (currentCharacter between:$- and:$/) ifTrue:[
+            [
+                self recordMatch:#( 30 ).
+                self step.
+                (currentCharacter isLetterOrDigit 
+                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+            ] whileTrue.
+            ^ self reportLastMatch
+        ].
+        (currentCharacter == $r) ifTrue:[
+            self recordMatch:#( 27 30 ).
+            self step.
+            (currentCharacter isXMLDigit 
+                or:[
+                    (currentCharacter between:$A and:$Z) 
+                        or:[
+                            currentCharacter == $_ 
+                                or:[
+                                    (currentCharacter between:$a and:$n) 
+                                        or:[ (currentCharacter between:$p and:$z) ]
+                                ]
+                        ]
+                ]) 
+                    ifTrue:[ ^ self scan1 ].
+            (currentCharacter between:$- and:$/) ifTrue:[
+                [
+                    self recordMatch:#( 30 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit 
+                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                ] whileTrue.
+                ^ self reportLastMatch
+            ].
+            (currentCharacter == $o) ifTrue:[
+                self recordMatch:#( 27 30 ).
+                self step.
+                ((currentCharacter between:$0 and:$9) 
+                    or:[
+                        (currentCharacter between:$A and:$Z) 
+                            or:[
+                                currentCharacter == $_ 
+                                    or:[
+                                        (currentCharacter between:$a and:$l) 
+                                            or:[ (currentCharacter between:$n and:$z) ]
+                                    ]
+                            ]
+                    ]) 
+                        ifTrue:[ ^ self scan1 ].
+                (currentCharacter between:$- and:$/) ifTrue:[
+                    [
+                        self recordMatch:#( 30 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit 
+                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                    ] whileTrue.
+                    ^ self reportLastMatch
+                ].
+                (currentCharacter == $m) ifTrue:[
+                    self recordMatch:#( 27 30 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ]) ifTrue:[
+                        ^ self scan1
+                    ].
+                    (currentCharacter between:$- and:$/) ifTrue:[
+                        [
+                            self recordMatch:#( 30 ).
+                            self step.
+                            (currentCharacter isLetterOrDigit 
+                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                        ] whileTrue.
+                        ^ self reportLastMatch
+                    ].
+                    (currentCharacter == $:) ifTrue:[
+                        ^ self recordAndReportMatch:#( 9 ).
+                    ].
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+            ^ self reportLastMatch
+        ].
+        (currentCharacter == $u) ifTrue:[
+            self recordMatch:#( 27 30 ).
+            self step.
+            ((currentCharacter between:$0 and:$9) 
+                or:[
+                    (currentCharacter between:$A and:$Z) 
+                        or:[
+                            currentCharacter == $_ 
+                                or:[
+                                    (currentCharacter between:$a and:$m) 
+                                        or:[ (currentCharacter between:$o and:$z) ]
+                                ]
+                        ]
+                ]) 
+                    ifTrue:[ ^ self scan1 ].
+            (currentCharacter between:$- and:$/) ifTrue:[
+                [
+                    self recordMatch:#( 30 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit 
+                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                ] whileTrue.
+                ^ self reportLastMatch
+            ].
+            (currentCharacter == $n) ifTrue:[
+                self recordMatch:#( 27 30 ).
+                self step.
+                ((currentCharacter between:$0 and:$9) 
+                    or:[
+                        (currentCharacter between:$A and:$Z) 
+                            or:[
+                                currentCharacter == $_ 
+                                    or:[
+                                        (currentCharacter between:$a and:$b) 
+                                            or:[ (currentCharacter between:$d and:$z) ]
+                                    ]
+                            ]
+                    ]) 
+                        ifTrue:[ ^ self scan1 ].
+                (currentCharacter between:$- and:$/) ifTrue:[
+                    [
+                        self recordMatch:#( 30 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit 
+                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                    ] whileTrue.
+                    ^ self reportLastMatch
+                ].
+                (currentCharacter == $c) ifTrue:[
+                    self recordMatch:#( 27 30 ).
+                    self step.
+                    ((currentCharacter between:$0 and:$9) 
+                        or:[
+                            (currentCharacter between:$A and:$Z) 
+                                or:[
+                                    currentCharacter == $_ 
+                                        or:[
+                                            (currentCharacter between:$a and:$s) 
+                                                or:[ (currentCharacter between:$u and:$z) ]
+                                        ]
+                                ]
+                        ]) 
+                            ifTrue:[ ^ self scan1 ].
+                    (currentCharacter between:$- and:$/) ifTrue:[
+                        [
+                            self recordMatch:#( 30 ).
+                            self step.
+                            (currentCharacter isLetterOrDigit 
+                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                        ] whileTrue.
+                        ^ self reportLastMatch
+                    ].
+                    (currentCharacter == $t) ifTrue:[
+                        self recordMatch:#( 27 30 ).
+                        self step.
+                        (currentCharacter isXMLDigit 
+                            or:[
+                                (currentCharacter between:$A and:$Z) 
+                                    or:[
+                                        currentCharacter == $_ 
+                                            or:[
+                                                (currentCharacter between:$a and:$h) 
+                                                    or:[ (currentCharacter between:$j and:$z) ]
+                                            ]
+                                    ]
+                            ]) 
+                                ifTrue:[ ^ self scan1 ].
+                        (currentCharacter between:$- and:$/) ifTrue:[
+                            [
+                                self recordMatch:#( 30 ).
+                                self step.
+                                (currentCharacter isLetterOrDigit 
+                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                            ] whileTrue.
+                            ^ self reportLastMatch
+                        ].
+                        (currentCharacter == $i) ifTrue:[
+                            self recordMatch:#( 27 30 ).
+                            self step.
+                            (currentCharacter isXMLDigit 
+                                or:[
+                                    (currentCharacter between:$A and:$Z) 
+                                        or:[
+                                            currentCharacter == $_ 
+                                                or:[
+                                                    (currentCharacter between:$a and:$n) 
+                                                        or:[ (currentCharacter between:$p and:$z) ]
+                                                ]
+                                        ]
+                                ]) 
+                                    ifTrue:[ ^ self scan1 ].
+                            (currentCharacter between:$- and:$/) ifTrue:[
+                                [
+                                    self recordMatch:#( 30 ).
+                                    self step.
+                                    (currentCharacter isLetterOrDigit 
+                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                ] whileTrue.
+                                ^ self reportLastMatch
+                            ].
+                            (currentCharacter == $o) ifTrue:[
+                                self recordMatch:#( 27 30 ).
+                                self step.
+                                ((currentCharacter between:$0 and:$9) 
+                                    or:[
+                                        (currentCharacter between:$A and:$Z) 
+                                            or:[
+                                                currentCharacter == $_ 
+                                                    or:[
+                                                        (currentCharacter between:$a and:$m) 
+                                                            or:[ (currentCharacter between:$o and:$z) ]
+                                                    ]
+                                            ]
+                                    ]) 
+                                        ifTrue:[ ^ self scan1 ].
+                                (currentCharacter between:$- and:$/) ifTrue:[
+                                    [
+                                        self recordMatch:#( 30 ).
+                                        self step.
+                                        (currentCharacter isLetterOrDigit 
+                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                    ] whileTrue.
+                                    ^ self reportLastMatch
+                                ].
+                                (currentCharacter == $n) ifTrue:[
+                                    self recordMatch:#( 27 30 ).
+                                    self step.
+                                    (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ]) ifTrue:[
+                                        ^ self scan1
+                                    ].
+                                    (currentCharacter between:$. and:$/) ifTrue:[
+                                        [
+                                            self recordMatch:#( 30 ).
+                                            self step.
+                                            (currentCharacter isLetterOrDigit 
+                                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                        ] whileTrue.
+                                        ^ self reportLastMatch
+                                    ].
+                                    (currentCharacter == $-) ifTrue:[
+                                        self recordMatch:#( 30 ).
+                                        self step.
+                                        ((currentCharacter between:$- and:$9) 
+                                            or:[
+                                                (currentCharacter between:$A and:$Z) 
+                                                    or:[
+                                                        currentCharacter == $_ 
+                                                            or:[
+                                                                (currentCharacter between:$a and:$s) 
+                                                                    or:[ (currentCharacter between:$u and:$z) ]
+                                                            ]
+                                                    ]
+                                            ]) 
+                                                ifTrue:[
+                                                    [
+                                                        self recordMatch:#( 30 ).
+                                                        self step.
+                                                        (currentCharacter isLetterOrDigit 
+                                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                    ] whileTrue.
+                                                    ^ self reportLastMatch
+                                                ].
+                                        (currentCharacter == $t) ifTrue:[
+                                            self recordMatch:#( 30 ).
+                                            self step.
+                                            ((currentCharacter between:$- and:$9) 
+                                                or:[
+                                                    (currentCharacter between:$A and:$Z) 
+                                                        or:[
+                                                            currentCharacter == $_ 
+                                                                or:[ (currentCharacter between:$a and:$x) or:[ currentCharacter == $z ] ]
+                                                        ]
+                                                ]) 
+                                                    ifTrue:[
+                                                        [
+                                                            self recordMatch:#( 30 ).
+                                                            self step.
+                                                            (currentCharacter isLetterOrDigit 
+                                                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                        ] whileTrue.
+                                                        ^ self reportLastMatch
+                                                    ].
+                                            (currentCharacter == $y) ifTrue:[
+                                                self recordMatch:#( 30 ).
+                                                self step.
+                                                ((currentCharacter between:$- and:$9) 
+                                                    or:[
+                                                        (currentCharacter between:$A and:$Z) 
+                                                            or:[
+                                                                currentCharacter == $_ 
+                                                                    or:[
+                                                                        (currentCharacter between:$a and:$o) 
+                                                                            or:[ (currentCharacter between:$q and:$z) ]
+                                                                    ]
+                                                            ]
+                                                    ]) 
+                                                        ifTrue:[
+                                                            [
+                                                                self recordMatch:#( 30 ).
+                                                                self step.
+                                                                (currentCharacter isLetterOrDigit 
+                                                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                            ] whileTrue.
+                                                            ^ self reportLastMatch
+                                                        ].
+                                                (currentCharacter == $p) ifTrue:[
+                                                    self recordMatch:#( 30 ).
+                                                    self step.
+                                                    (currentCharacter isXMLDigit 
+                                                        or:[
+                                                            (currentCharacter between:$- and:$/) 
+                                                                or:[
+                                                                    (currentCharacter between:$A and:$Z) 
+                                                                        or:[
+                                                                            currentCharacter == $_ 
+                                                                                or:[
+                                                                                    (currentCharacter between:$a and:$d) 
+                                                                                        or:[ (currentCharacter between:$f and:$z) ]
+                                                                                ]
+                                                                        ]
+                                                                ]
+                                                        ]) 
+                                                            ifTrue:[
+                                                                [
+                                                                    self recordMatch:#( 30 ).
+                                                                    self step.
+                                                                    (currentCharacter isLetterOrDigit 
+                                                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                                ] whileTrue.
+                                                                ^ self reportLastMatch
+                                                            ].
+                                                    (currentCharacter == $e) ifTrue:[
+                                                        self recordMatch:#( 1 30 ).
+                                                        self step.
+                                                        (currentCharacter isLetterOrDigit 
+                                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ]) 
+                                                                ifTrue:[
+                                                                    [
+                                                                        self recordMatch:#( 30 ).
+                                                                        self step.
+                                                                        (currentCharacter isLetterOrDigit 
+                                                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                                    ] whileTrue.
+                                                                    ^ self reportLastMatch
+                                                                ].
+                                                        ^ self reportLastMatch
+                                                    ].
+                                                    ^ self reportLastMatch
+                                                ].
+                                                ^ self reportLastMatch
+                                            ].
+                                            ^ self reportLastMatch
+                                        ].
+                                        ^ self reportLastMatch
+                                    ].
+                                    ^ self reportLastMatch
+                                ].
+                                ^ self reportLastMatch
+                            ].
+                            ^ self reportLastMatch
+                        ].
+                        ^ self reportLastMatch
+                    ].
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+            ^ self reportLastMatch
+        ].
+        ^ self reportLastMatch
+    ].
+    (currentCharacter == $p) ifTrue:[
+        self recordMatch:#( 27 30 ).
+        self step.
+        (currentCharacter isXMLDigit 
+            or:[
+                (currentCharacter between:$A and:$Z) 
+                    or:[
+                        currentCharacter == $_ 
+                            or:[
+                                (currentCharacter between:$a and:$n) 
+                                    or:[ (currentCharacter between:$p and:$z) ]
+                            ]
+                    ]
+            ]) 
+                ifTrue:[ ^ self scan1 ].
+        (currentCharacter between:$- and:$/) ifTrue:[
+            [
+                self recordMatch:#( 30 ).
+                self step.
+                (currentCharacter isLetterOrDigit 
+                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+            ] whileTrue.
+            ^ self reportLastMatch
+        ].
+        (currentCharacter == $o) ifTrue:[
+            self recordMatch:#( 27 30 ).
+            self step.
+            (currentCharacter isXMLDigit 
+                or:[
+                    (currentCharacter between:$A and:$Z) 
+                        or:[
+                            currentCharacter == $_ 
+                                or:[
+                                    (currentCharacter between:$a and:$h) 
+                                        or:[ (currentCharacter between:$j and:$z) ]
+                                ]
+                        ]
+                ]) 
+                    ifTrue:[ ^ self scan1 ].
+            (currentCharacter between:$- and:$/) ifTrue:[
+                [
+                    self recordMatch:#( 30 ).
+                    self step.
+                    (currentCharacter isLetterOrDigit 
+                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                ] whileTrue.
+                ^ self reportLastMatch
+            ].
+            (currentCharacter == $i) ifTrue:[
+                self recordMatch:#( 27 30 ).
+                self step.
+                ((currentCharacter between:$0 and:$9) 
+                    or:[
+                        (currentCharacter between:$A and:$Z) 
+                            or:[
+                                currentCharacter == $_ 
+                                    or:[
+                                        (currentCharacter between:$a and:$m) 
+                                            or:[ (currentCharacter between:$o and:$z) ]
+                                    ]
+                            ]
+                    ]) 
+                        ifTrue:[ ^ self scan1 ].
+                (currentCharacter between:$- and:$/) ifTrue:[
+                    [
+                        self recordMatch:#( 30 ).
+                        self step.
+                        (currentCharacter isLetterOrDigit 
+                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                    ] whileTrue.
+                    ^ self reportLastMatch
+                ].
+                (currentCharacter == $n) ifTrue:[
+                    self recordMatch:#( 27 30 ).
+                    self step.
+                    ((currentCharacter between:$0 and:$9) 
+                        or:[
+                            (currentCharacter between:$A and:$Z) 
+                                or:[
+                                    currentCharacter == $_ 
+                                        or:[
+                                            (currentCharacter between:$a and:$s) 
+                                                or:[ (currentCharacter between:$u and:$z) ]
+                                        ]
+                                ]
+                        ]) 
+                            ifTrue:[ ^ self scan1 ].
+                    (currentCharacter between:$- and:$/) ifTrue:[
+                        [
+                            self recordMatch:#( 30 ).
+                            self step.
+                            (currentCharacter isLetterOrDigit 
+                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                        ] whileTrue.
+                        ^ self reportLastMatch
+                    ].
+                    (currentCharacter == $t) ifTrue:[
+                        self recordMatch:#( 27 30 ).
+                        self step.
+                        (currentCharacter isXMLDigit 
+                            or:[
+                                (currentCharacter between:$A and:$Z) 
+                                    or:[
+                                        currentCharacter == $_ 
+                                            or:[
+                                                (currentCharacter between:$a and:$d) 
+                                                    or:[ (currentCharacter between:$f and:$z) ]
+                                            ]
+                                    ]
+                            ]) 
+                                ifTrue:[ ^ self scan1 ].
+                        (currentCharacter between:$- and:$/) ifTrue:[
+                            [
+                                self recordMatch:#( 30 ).
+                                self step.
+                                (currentCharacter isLetterOrDigit 
+                                    or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                            ] whileTrue.
+                            ^ self reportLastMatch
+                        ].
+                        (currentCharacter == $e) ifTrue:[
+                            self recordMatch:#( 27 30 ).
+                            self step.
+                            ((currentCharacter between:$0 and:$9) 
+                                or:[
+                                    (currentCharacter between:$A and:$Z) 
+                                        or:[
+                                            currentCharacter == $_ 
+                                                or:[
+                                                    (currentCharacter between:$a and:$q) 
+                                                        or:[ (currentCharacter between:$s and:$z) ]
+                                                ]
+                                        ]
+                                ]) 
+                                    ifTrue:[ ^ self scan1 ].
+                            (currentCharacter between:$- and:$/) ifTrue:[
+                                [
+                                    self recordMatch:#( 30 ).
+                                    self step.
+                                    (currentCharacter isLetterOrDigit 
+                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                ] whileTrue.
+                                ^ self reportLastMatch
+                            ].
+                            (currentCharacter == $r) ifTrue:[
+                                self recordMatch:#( 27 30 ).
+                                self step.
+                                (currentCharacter isLetterOrDigit or:[ currentCharacter == $_ ]) ifTrue:[
+                                    ^ self scan1
+                                ].
+                                (currentCharacter between:$. and:$/) ifTrue:[
+                                    [
+                                        self recordMatch:#( 30 ).
+                                        self step.
+                                        (currentCharacter isLetterOrDigit 
+                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                    ] whileTrue.
+                                    ^ self reportLastMatch
+                                ].
+                                (currentCharacter == $-) ifTrue:[
+                                    self recordMatch:#( 30 ).
+                                    self step.
+                                    ((currentCharacter between:$- and:$9) 
+                                        or:[
+                                            (currentCharacter between:$A and:$Z) 
+                                                or:[
+                                                    currentCharacter == $_ 
+                                                        or:[
+                                                            (currentCharacter between:$a and:$s) 
+                                                                or:[ (currentCharacter between:$u and:$z) ]
+                                                        ]
+                                                ]
+                                        ]) 
+                                            ifTrue:[
+                                                [
+                                                    self recordMatch:#( 30 ).
+                                                    self step.
+                                                    (currentCharacter isLetterOrDigit 
+                                                        or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                ] whileTrue.
+                                                ^ self reportLastMatch
+                                            ].
+                                    (currentCharacter == $t) ifTrue:[
+                                        self recordMatch:#( 30 ).
+                                        self step.
+                                        (currentCharacter isXMLDigit 
+                                            or:[
+                                                (currentCharacter between:$- and:$/) 
+                                                    or:[
+                                                        (currentCharacter between:$A and:$Z) 
+                                                            or:[
+                                                                currentCharacter == $_ 
+                                                                    or:[
+                                                                        (currentCharacter between:$a and:$n) 
+                                                                            or:[ (currentCharacter between:$p and:$z) ]
+                                                                    ]
+                                                            ]
+                                                    ]
+                                            ]) 
+                                                ifTrue:[
+                                                    [
+                                                        self recordMatch:#( 30 ).
+                                                        self step.
+                                                        (currentCharacter isLetterOrDigit 
+                                                            or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                    ] whileTrue.
+                                                    ^ self reportLastMatch
+                                                ].
+                                        (currentCharacter == $o) ifTrue:[
+                                            self recordMatch:#( 23 30 ).
+                                            self step.
+                                            (currentCharacter isLetterOrDigit 
+                                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ]) 
+                                                    ifTrue:[
+                                                        [
+                                                            self recordMatch:#( 30 ).
+                                                            self step.
+                                                            (currentCharacter isLetterOrDigit 
+                                                                or:[ (currentCharacter between:$- and:$/) or:[ currentCharacter == $_ ] ])
+                                                        ] whileTrue.
+                                                        ^ self reportLastMatch
+                                                    ].
+                                            ^ self reportLastMatch
+                                        ].
+                                        ^ self reportLastMatch
+                                    ].
+                                    ^ self reportLastMatch
+                                ].
+                                ^ self reportLastMatch
+                            ].
+                            ^ self reportLastMatch
+                        ].
+                        ^ self reportLastMatch
+                    ].
+                    ^ self reportLastMatch
+                ].
+                ^ self reportLastMatch
+            ].
+            ^ self reportLastMatch
+        ].
+        ^ self reportLastMatch
+    ].
+    ^ self reportLastMatch
+
+    "Modified: / 17-02-2008 / 18:45:28 / janfrog"
+! !
+
+!CDefinitionScanner methodsFor:'generated-tokens'!
+
+emptySymbolTokenId
+	^59
+
+    "Modified: / 17-02-2008 / 18:45:28 / janfrog"
+!
+
+errorTokenId
+	^60
+
+    "Modified: / 17-02-2008 / 18:45:28 / janfrog"
+! !
+
+!CDefinitionScanner class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /opt/data/cvs/cvut-fel/cface/Cface__CDefinitionScanner.st,v 1.1 2008/02/26 16:00:43 vranyj1 Exp $'
+! !