From VisualWorks®, Pre-Release 7.3.1 (jan05.1) of January 24, 2005 on November 25, 2005 at 11:49:11 am StstURL Roots.Distributed Net.URLwithPath false none application host port user password type variant Roots-Distributed-Opentalk Roots-Distributed-Stst Roots.Distributed.StstURL class accessing protocol ^'stst' Roots.Distributed.StstURL class instance creation fromString: aString "URI class removes the protocol, and the parser expects it" ^self parse: (((aString copyFrom: 1 to: self protocol size) = self protocol) ifTrue: [aString] ifFalse: [self protocol, ':', aString]) parse: aString ^StstURLParser parse: aString Roots.Distributed.StstURL accessing application ^application application: anObject application := anObject host ^host host: anObject host := anObject password ^password password: anObject password := anObject port ^port port: anObject port := anObject type ^type type: anObject type := anObject user ^user user: anObject user := anObject Roots.Distributed.StstURL converting asContext ^StstContext fromURL: self asString ^self printString Roots.Distributed.StstURL printing printOn: aStream aStream nextPutAll: self class protocol; nextPutAll: '://'. self user notNil ifTrue: [ aStream nextPutAll: self user. self password notNil ifTrue: [ aStream nextPut: $:; nextPutAll: self password]. aStream nextPut: $@]. self host notNil ifTrue: [ aStream nextPutAll: self host. self port notNil ifTrue: [ aStream nextPut: $:; nextPutAll: self port printString]. aStream nextPut: $/]. aStream nextPutAll: self application. StstURLParser Roots.Distributed Refactory.SmaCC.SmaCCParser false none url SmaCC Generated Scanner/Parser Roots-Distributed-Stst Roots.Distributed.StstURLParser class generated-accessing scannerClass ^StstURLScanner Roots.Distributed.StstURLParser class generated-starting states startingStateForStstURL ^1 Roots.Distributed.StstURLParser class generated-comments parserDefinitionComment "StstURL: ""stst://"" ( login ""@"" )? hostport ""/"" application { url } ; login: user ( "":"" password )? ; hostport: host ( "":"" port )? ; user: <IDENTIFIER> { url user: '1' value } ; password: <IDENTIFIER> { url password: '1' value } ; host: ( <HOST_NAME> | <IP_ADDRESS> ) { url host: '1' value } ; port: <NUMBER> { url port: '1' value asNumber } ; application: <IDENTIFIER> { url application: '1' value } ;" Roots.Distributed.StstURLParser initialize-release initialize super initialize. url := StstURL new. Roots.Distributed.StstURLParser generated-reduction actions reduceActionForapplication1: nodes ^url application: (nodes at: 1) value reduceActionForGroup______HOST_NAME_____IP_ADDRESS_1: nodes ^nodes at: 1 reduceActionForGroup______HOST_NAME_____IP_ADDRESS_2: nodes ^nodes at: 1 reduceActionForhost1: nodes ^url host: (nodes at: 1) value reduceActionForOptional__Group_____login____1: nodes ^nil reduceActionForOptional__Group_____login____2: nodes ^nodes at: 1 reduceActionForOptional__Group_________password1: nodes ^nil reduceActionForOptional__Group_________password2: nodes ^nodes at: 1 reduceActionForOptional__Group_________port1: nodes ^nil reduceActionForOptional__Group_________port2: nodes ^nodes at: 1 reduceActionForpassword1: nodes ^url password: (nodes at: 1) value reduceActionForport1: nodes ^url port: (nodes at: 1) value asNumber reduceActionForStstURL1: nodes ^url reduceActionForuser1: nodes ^url user: (nodes at: 1) value Roots.Distributed.StstURLParser generated-tables reduceTable ^#( #(10 5 #reduceActionForStstURL1:) #(11 1 #reduceFor:) #(12 1 #reduceActionForuser1:) #(13 1 #reduceActionForpassword1:) #(14 1 #reduceActionForapplication1:) #(15 0 #reduceActionForOptional__Group_________password1:) #(15 1 #reduceActionForOptional__Group_________password2:) #(16 1 #reduceActionForhost1:) #(17 1 #reduceActionForport1:) #(18 2 #reduceFor:) #(19 0 #reduceActionForOptional__Group_________port1:) #(19 1 #reduceActionForOptional__Group_________port2:) #(20 0 #reduceActionForOptional__Group_____login____1:) #(20 1 #reduceActionForOptional__Group_____login____2:) #(21 2 #reduceFor:) #(22 2 #reduceFor:) #(23 1 #reduceActionForGroup______HOST_NAME_____IP_ADDRESS_1:) #(23 1 #reduceActionForGroup______HOST_NAME_____IP_ADDRESS_2:) #(24 2 #reduceFor:) #(27 2 #reduceFor:) ) transitionTable ^#( #[1 0 9 0 1 0 13 0 10] #[1 0 54 0 7 0 17 0 8 0 54 0 9 0 21 0 12 0 25 0 20 0 29 0 22 0 33 0 24] #[0 0 0 0 25] #[0 0 14 0 2 0 4] #[1 0 26 0 2 0 37 0 4 0 41 0 15 0 45 0 27] #[1 0 49 0 7 0 53 0 9 0 57 0 16 0 61 0 21 0 65 0 23] #[0 0 69 0 2] #[0 0 58 0 7 0 9] #[1 0 73 0 8 0 77 0 13] #[0 0 66 0 2] #[0 0 30 0 2] #[0 0 74 0 3 0 4] #[0 0 70 0 3 0 4] #[1 0 46 0 3 0 81 0 4 0 85 0 18 0 89 0 19] #[0 0 93 0 3] #[0 0 34 0 3 0 4] #[0 0 78 0 7 0 9] #[0 0 18 0 2] #[0 0 82 0 2] #[1 0 97 0 6 0 101 0 17] #[0 0 50 0 3] #[0 0 62 0 3] #[1 0 105 0 8 0 109 0 14] #[0 0 38 0 3] #[0 0 42 0 3] #[0 0 22 0 25] #[0 0 6 0 25] ) StstURLScanner Roots.Distributed Refactory.SmaCC.SmaCCScanner false none SmaCC Generated Scanner/Parser Roots-Distributed-Stst Roots.Distributed.StstURLScanner class generated-comments scannerDefinitionComment "<whitespace> : \s+ ; <LETTER> : [a-zA-Z] ; <DIGIT> : \d ; <NUMBER> : <DIGIT>+ ; <IP_ADDRESS> : (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) ; <IDENTIFIER> : <LETTER> ( \- | <LETTER> | <DIGIT> )* ; <HOST_NAME> : <IDENTIFIER> ( \. <IDENTIFIER> )* ;" Roots.Distributed.StstURLScanner generated-scanner scan1 self step. (currentCharacter between: $3 and: $9) ifTrue: [^self scan14]. (currentCharacter between: $0 and: $1) ifTrue: [self step. currentCharacter isDigit ifTrue: [^self scan14]. currentCharacter == $. ifTrue: [^self scan3]. ^self reportLastMatch]. currentCharacter == $2 ifTrue: [self step. (currentCharacter between: $0 and: $4) ifTrue: [^self scan14]. (currentCharacter between: $6 and: $9) ifTrue: [^self scan2]. currentCharacter == $. ifTrue: [^self scan3]. currentCharacter == $5 ifTrue: [self step. (currentCharacter between: $0 and: $5) ifTrue: [^self scan2]. currentCharacter == $. ifTrue: [^self scan3]. ^self reportLastMatch]]. ^self reportLastMatch scan10 self recordMatch: #(6). self step. currentCharacter isDigit ifTrue: [ [self recordMatch: #(6). self step. currentCharacter isDigit] whileTrue. ^self reportLastMatch]. currentCharacter == $. ifTrue: [^self scan1]. ^self reportLastMatch scan11 self recordMatch: #(6). self step. currentCharacter isDigit ifTrue: [^self scan10]. currentCharacter == $. ifTrue: [^self scan1]. ^self reportLastMatch scan12 self recordMatch: #(7). self step. currentCharacter isDigit ifTrue: [^self recordAndReportMatch: #(7)]. ^self reportLastMatch scan13 self step. currentCharacter isDigit ifTrue: [^self scan4]. currentCharacter == $. ifTrue: [^self scan5]. ^self reportLastMatch scan14 self step. currentCharacter isDigit ifTrue: [^self scan2]. currentCharacter == $. ifTrue: [^self scan3]. ^self reportLastMatch scan15 self recordMatch: #(6). self step. (currentCharacter between: $0 and: $5) ifTrue: [^self scan10]. (currentCharacter between: $6 and: $9) ifTrue: [ [self recordMatch: #(6). self step. currentCharacter isDigit] whileTrue. ^self reportLastMatch]. currentCharacter == $. ifTrue: [^self scan1]. ^self reportLastMatch scan2 self step. currentCharacter == $. ifTrue: [^self scan3]. ^self reportLastMatch scan3 self step. (currentCharacter between: $3 and: $9) ifTrue: [^self scan13]. (currentCharacter between: $0 and: $1) ifTrue: [self step. currentCharacter isDigit ifTrue: [^self scan13]. currentCharacter == $. ifTrue: [^self scan5]. ^self reportLastMatch]. currentCharacter == $2 ifTrue: [self step. (currentCharacter between: $0 and: $4) ifTrue: [^self scan13]. (currentCharacter between: $6 and: $9) ifTrue: [^self scan4]. currentCharacter == $. ifTrue: [^self scan5]. currentCharacter == $5 ifTrue: [self step. (currentCharacter between: $0 and: $5) ifTrue: [^self scan4]. currentCharacter == $. ifTrue: [^self scan5]. ^self reportLastMatch]]. ^self reportLastMatch scan4 self step. currentCharacter == $. ifTrue: [^self scan5]. ^self reportLastMatch scan5 self step. (currentCharacter between: $3 and: $9) ifTrue: [^self scan12]. (currentCharacter between: $0 and: $1) ifTrue: [self recordMatch: #(7). self step. currentCharacter isDigit ifTrue: [^self scan12]. ^self reportLastMatch]. currentCharacter == $2 ifTrue: [self recordMatch: #(7). self step. (currentCharacter between: $0 and: $4) ifTrue: [^self scan12]. (currentCharacter between: $6 and: $9) ifTrue: [^self recordAndReportMatch: #(7)]. currentCharacter == $5 ifTrue: [self recordMatch: #(7). self step. (currentCharacter between: $0 and: $5) ifTrue: [^self recordAndReportMatch: #(7)]. ^self reportLastMatch]]. ^self reportLastMatch scan6 self step. currentCharacter isAlphabetic ifTrue: [ [self recordMatch: #(9). self step. currentCharacter isAlphaNumeric or: [currentCharacter == $-]] whileTrue. currentCharacter == $. ifTrue: [^self scan6]]. ^self reportLastMatch scan7 self recordMatch: #(6). self step. currentCharacter isDigit ifTrue: [^self scan11]. currentCharacter == $. ifTrue: [^self scan1]. ^self reportLastMatch scan8 self recordMatch: #(6). self step. (currentCharacter between: $0 and: $4) ifTrue: [^self scan11]. (currentCharacter between: $6 and: $9) ifTrue: [^self scan10]. currentCharacter == $. ifTrue: [^self scan1]. currentCharacter == $5 ifTrue: [^self scan15]. ^self reportLastMatch scan9 [self recordMatch: #(8 9). self step. currentCharacter isAlphaNumeric or: [currentCharacter == $-]] whileTrue. currentCharacter == $. ifTrue: [^self scan6]. ^self reportLastMatch scanForToken self step. ((currentCharacter between: $A and: $Z) or: [(currentCharacter between: $a and: $r) or: [currentCharacter between: $t and: $z]]) ifTrue: [^self scan9]. (currentCharacter between: $3 and: $9) ifTrue: [^self scan11]. ((currentCharacter between: Character tab and: Character cr) or: [currentCharacter == Character space]) ifTrue: [ [self recordMatch: #whitespace. self step. (currentCharacter between: Character tab and: Character cr) or: [currentCharacter == Character space]] whileTrue. ^self reportLastMatch]. (currentCharacter between: $0 and: $1) ifTrue: [^self scan7]. currentCharacter == $/ ifTrue: [^self recordAndReportMatch: #(3)]. currentCharacter == $2 ifTrue: [^self scan8]. currentCharacter == $: ifTrue: [^self recordAndReportMatch: #(4)]. currentCharacter == $@ ifTrue: [^self recordAndReportMatch: #(2)]. currentCharacter == $s ifTrue: [self recordMatch: #(8 9). self step. (currentCharacter isDigit or: [currentCharacter == $- or: [(currentCharacter between: $A and: $Z) or: [(currentCharacter between: $a and: $s) or: [currentCharacter between: $u and: $z]]]]) ifTrue: [^self scan9]. currentCharacter == $. ifTrue: [^self scan6]. currentCharacter == $t ifTrue: [self recordMatch: #(8 9). self step. (currentCharacter isDigit or: [currentCharacter == $- or: [(currentCharacter between: $A and: $Z) or: [(currentCharacter between: $a and: $r) or: [currentCharacter between: $t and: $z]]]]) ifTrue: [^self scan9]. currentCharacter == $. ifTrue: [^self scan6]. currentCharacter == $s ifTrue: [self recordMatch: #(8 9). self step. (currentCharacter isDigit or: [currentCharacter == $- or: [(currentCharacter between: $A and: $Z) or: [(currentCharacter between: $a and: $s) or: [currentCharacter between: $u and: $z]]]]) ifTrue: [^self scan9]. currentCharacter == $. ifTrue: [^self scan6]. currentCharacter == $t ifTrue: [self recordMatch: #(8 9). self step. (currentCharacter isAlphaNumeric or: [currentCharacter == $-]) ifTrue: [^self scan9]. currentCharacter == $. ifTrue: [^self scan6]. currentCharacter == $: ifTrue: [self step. currentCharacter == $/ ifTrue: [self step. currentCharacter == $/ ifTrue: [^self recordAndReportMatch: #(1)]. ^self reportLastMatch]]. ^self reportLastMatch]]. ^self reportLastMatch]]. ^self reportLastMatch Roots.Distributed.StstURLScanner generated-tokens emptySymbolTokenId ^25 errorTokenId ^26