eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RBScanner':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: RBScanner


Inheritance:

   Object
   |
   +--Stream
      |
      +--RBScanner

Package:
stx:goodies/refactoryBrowser/parser
Category:
Refactory-Scanner
Version:
rev: 1.114 date: 2019/08/11 12:26:13
user: cg
file: RBScanner.st directory: goodies/refactoryBrowser/parser
module: stx stc-classLibrary: parser

Class protocol:

accessing
o  classificationTable

o  metaVariableCharacter

o  patternVariableCharacter

class initialization
o  initialize
plus-or-minus

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

testing
o  isSelector: aSymbol

o  isVariable: aString


Instance protocol:

accessing
o  addToCommentsBeforeToken: aCollection

o  classificationTable: anObject

o  contents

o  currentCharacter

o  currentPosition

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
enable token remembering.
In case of an error, this allows for the tokens which have been collected
so far to be fetched. Useful for code completion of incomplete (erroneous) code.

o  rememberedTokens
In case of an error, this allows for the tokens which have been collected
so far to be fetched. Useful for code completion of incomplete (erroneous) code.

o  saveComments

o  saveComments: aBoolean

o  tokenLineNumber

o  tokenStart

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.

private
o  bufferContents

o  classify: aCharacter

o  previousStepPosition

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

private-scanning
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
special: c' is scanned as a C-string

o  scanLiteralArray

o  scanLiteralCString: nodeClass
nothing for now

o  scanLiteralCharacter
$

o  scanLiteralString

o  scanLiteralString: class

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

o  scanName
scan over alphanumeric characters.
collect in buffer

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

scanning
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.

testing
o  atEnd

o  isReadable

o  isWritable



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 19 Mar 2024 09:22:45 GMT