1: ================================================================================ 2: 3: Smalltalk defineClass: #SynapseToken 4: superclass: #{Core.Object} 5: indexedType: #none 6: private: false 7: instanceVariableNames: 'tokenString tokenSymbol ' 8: classInstanceVariableNames: '' 9: imports: '' 10: category: '' 11: 12: ================================================================================ 13: 14: SynapseToken method for 'printing' 15: 16: printOn: aStream 17: 18: aStream 19: nextPutAll: self class name; 20: nextPutAll: ' string: '. 21: self tokenString 22: ifNil: [aStream nextPutAll: 'nil'] 23: ifNotNil: 24: [aStream 25: nextPutAll: ''''; 26: nextPutAll: self tokenString; 27: nextPutAll: '''']. 28: aStream 29: nextPutAll: ' symbol: '; 30: nextPutAll: self tokenSymbol printString; 31: yourself 32: 33: ------------------------------------------------------------ 34: 35: SynapseToken method for 'accessing' 36: 37: string 38: 39: ^self tokenString 40: 41: ------------------------------------------------------------ 42: 43: SynapseToken method for 'initialize-release' 44: 45: string: aString symbol: aSymbol 46: 47: tokenString := aString. 48: tokenSymbol := aSymbol. 49: ^self yourself 50: 51: ------------------------------------------------------------ 52: 53: SynapseToken method for 'accessing' 54: 55: symbol 56: 57: ^self tokenSymbol 58: 59: ------------------------------------------------------------ 60: 61: SynapseToken method for 'accessing' 62: 63: tokenString 64: 65: ^tokenString 66: 67: ------------------------------------------------------------ 68: 69: SynapseToken method for 'accessing' 70: 71: tokenSymbol 72: 73: ^tokenSymbol 74: 75: ================================================================================ 76: 77: Smalltalk.SynapseToken class 78: instanceVariableNames: '' 79: 80: ================================================================================ 81: 82: SynapseToken class method for 'default symbols' 83: 84: acceptanceSymbol 85: 86: ^#acceptance 87: 88: ------------------------------------------------------------ 89: 90: SynapseToken class method for 'instance creation' 91: 92: acceptanceToken 93: 94: ^self string: nil symbol: self acceptanceSymbol 95: 96: ------------------------------------------------------------ 97: 98: SynapseToken class method for 'default symbols' 99: 100: commaSymbol 101: 102: ^#COMMA 103: 104: ------------------------------------------------------------ 105: 106: SynapseToken class method for 'instance creation' 107: 108: commaToken: aString 109: 110: ^self string: aString symbol: self commaSymbol 111: 112: ------------------------------------------------------------ 113: 114: SynapseToken class method for 'default symbols' 115: 116: commentSymbol 117: 118: ^#COMMENT 119: 120: ------------------------------------------------------------ 121: 122: SynapseToken class method for 'instance creation' 123: 124: commentToken: aString 125: 126: ^self string: aString symbol: self commentSymbol 127: 128: ------------------------------------------------------------ 129: 130: SynapseToken class method for 'default symbols' 131: 132: getsSymbol 133: 134: ^#GETS 135: 136: ------------------------------------------------------------ 137: 138: SynapseToken class method for 'instance creation' 139: 140: getsToken: aString 141: 142: ^self string: aString symbol: self getsSymbol 143: 144: ------------------------------------------------------------ 145: 146: SynapseToken class method for 'default symbols' 147: 148: idSymbol 149: 150: ^#ID 151: 152: ------------------------------------------------------------ 153: 154: SynapseToken class method for 'instance creation' 155: 156: idToken: aString 157: 158: ^self string: aString symbol: self idSymbol 159: 160: ------------------------------------------------------------ 161: 162: SynapseToken class method for 'default symbols' 163: 164: lparSymbol 165: 166: ^#LPAR 167: 168: ------------------------------------------------------------ 169: 170: SynapseToken class method for 'instance creation' 171: 172: lparToken: aString 173: 174: ^self string: aString symbol: self lparSymbol 175: 176: ------------------------------------------------------------ 177: 178: SynapseToken class method for 'default symbols' 179: 180: periodSymbol 181: 182: ^#PERIOD 183: 184: ------------------------------------------------------------ 185: 186: SynapseToken class method for 'instance creation' 187: 188: periodToken: aString 189: 190: ^self string: aString symbol: self periodSymbol 191: 192: ------------------------------------------------------------ 193: 194: SynapseToken class method for 'default symbols' 195: 196: rparSymbol 197: 198: ^#RPAR 199: 200: ------------------------------------------------------------ 201: 202: SynapseToken class method for 'instance creation' 203: 204: rparToken: aString 205: 206: ^self string: aString symbol: self rparSymbol 207: 208: ------------------------------------------------------------ 209: 210: SynapseToken class method for 'default symbols' 211: 212: semicolonSymbol 213: 214: ^#SEMICOLON 215: 216: ------------------------------------------------------------ 217: 218: SynapseToken class method for 'instance creation' 219: 220: semicolonToken: aString 221: 222: ^self string: aString symbol: self semicolonSymbol 223: 224: ------------------------------------------------------------ 225: 226: SynapseToken class method for 'default symbols' 227: 228: sendSymbol 229: 230: ^#SEND 231: 232: ------------------------------------------------------------ 233: 234: SynapseToken class method for 'instance creation' 235: 236: sendToken: aString 237: 238: ^self string: aString symbol: self sendSymbol 239: 240: ------------------------------------------------------------ 241: 242: SynapseToken class method for 'instance creation' 243: 244: string: aString symbol: aSymbol 245: 246: ^(self new) 247: string: aString symbol: aSymbol; 248: yourself 249: 250: ------------------------------------------------------------ 251: 252: SynapseToken class method for 'default symbols' 253: 254: stringSymbol 255: 256: ^#STRING 257: 258: ------------------------------------------------------------ 259: 260: SynapseToken class method for 'instance creation' 261: 262: stringToken: aString 263: 264: ^self string: aString symbol: self stringSymbol 265: 266: ------------------------------------------------------------ 267: 268: SynapseToken class method for 'default symbols' 269: 270: toSymbol 271: 272: ^#TO 273: 274: ------------------------------------------------------------ 275: 276: SynapseToken class method for 'instance creation' 277: 278: toToken: aString 279: 280: ^self string: aString symbol: self toSymbol 281: 282: ------------------------------------------------------------ 283: 284: SynapseToken class method for 'default symbols' 285: 286: unknownSymbol 287: 288: ^#unknown 289: 290: ------------------------------------------------------------ 291: 292: SynapseToken class method for 'instance creation' 293: 294: unknownToken: aString 295: 296: ^self string: aString symbol: self unknownSymbol 297: 298: ================================================================================
This document was generated by KSU.TextDoclet on 2013/02/22 at 01:01:17.