eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RBScanner':



Class: RBScanner



rev: 1.104 date: 2017/10/11 12:00:39
user: cg
file: RBScanner.st directory: goodies/refactoryBrowser/parser
module: stx stc-classLibrary: parser

Class protocol:

o  classificationTable

o  metaVariableCharacter

o  patternVariableCharacter

class initialization
o  initialize
usage example(s):
self initializeChars: '().:;[]^' to: #special. 
usage example(s):
	self initialize

o  initializeChars: characters to: aSymbol

instance creation
o  on: aStream

o  on: aStream errorBlock: aBlock

o  rewriteOn: aStream

o  rewriteOn: aStream errorBlock: aBlock

o  rewriteSavingCommentsOn: aStream

o  rewriteSavingCommentsOn: aStream errorBlock: aBlock

o  searchOn: aStream errorBlock: aBlock

o  isSelector: aSymbol

o  isVariable: aString

Instance protocol:

o  addToCommentsBeforeToken: aCollection

o  classificationTable: anObject

o  contents

o  currentCharacter

o  errorBlock: aBlock

o  extendedLanguage

o  extendedLanguage: aBoolean

o  flush

o  getComments

o  getCommentsAfterToken

o  getCommentsAfterTokenIfInLine: lineNrArg

o  getCommentsBeforeToken

o  ignoreComments

o  nextPut: anObject
Provide an error notification that the receiver does not
implement this message.

o  rememberTokens: aBoolean

o  rememberedTokens

o  saveComments

o  saveComments: aBoolean

o  tokenLineNumber

error handling
o  errorBlock

o  errorPosition

o  scannerError: aString
Evaluate the block. If it returns raise an error

initialization & release
o  initializeForIBM

o  initializeForSmalltalkX

o  initializeForSqueak

o  initializeForVisualWorks

o  on: aStream
OrderedCollection new.

o  bufferContents

o  classify: aCharacter

o  previousStepPosition

o  step
only happens if scan methods are called not via #next;

o  scanAnySymbol

o  scanBinary: aClass alreadyRead: prevCharacter
This doesn't parse according to the ANSI draft. It only parses 1 or 2 letter binary tokens.

o  scanByteArray

o  scanExponentMultipler
Did not read a valid exponent, e must be start of a message send

o  scanExtendedLiterals

o  scanExtendedSymbol
scan symbols like #. which are allowed by Squeak and ST/X but aren't standard

o  scanIdentifierOrKeyword

o  scanLiteralArray

o  scanLiteralCharacter

o  scanLiteralString

o  scanLiteralString: class

o  scanLiteralString: class recurse: recurse
cg: qho calls this, ever?

o  scanName
scan over alphanumeric characters.

o  scanNamespaceName

o  scanNumber
sets tokenNumberBase as side effect.

o  scanNumberIBM

o  scanNumberOfBase: anInteger
Scan a number. Return the number or nil if the current input isn't a valid number.

o  scanNumberVisualWorks

o  scanNumberWithoutExponent
Scan an IBM number with the radix -- don't scan the exponent though

o  scanOldStyleAssignOrIdentifier
invoked when an underscore is encountered

o  scanPatternVariable
ST/X new: `' makes it a regex-string '

o  scanQualifier

o  scanSTXPrimitiveCode
scan an inline C-primitive; % { has already been read.

o  scanSpecialCharacter

o  scanStringSymbol

o  stripCommentInto: whichCommentCollection
an EOL comment; stop is the char pos BEFORE the cr

o  stripSeparators

o  stripSeparatorsAndCommentsInto: whichCommentCollection

o  next
The EOF token should occur after the end of input

o  scanBinary: tokenClass
in '-<digit>', the '-' is scanned as a sign;

o  scanLiteral

o  scanLiteralArrayParts

o  scanSymbol
Squeak symbols may begin with a colon

o  scanToken
fast-n-ugly. Don't write stuff like this. Has been found to cause cancer in laboratory rats. Basically a
case statement. Didn't use Dictionary because lookup is pretty slow.

o  atEnd

o  isReadable

o  isWritable

ST/X; WebServer 1.663 at exept.de:8081; Thu, 23 May 2019 19:14:00 GMT