|
Class: RBScanner
Object
|
+--Stream
|
+--RBScanner
- Package:
- stx:goodies/refactoryBrowser/parser
- Category:
- Refactory-Scanner
- Version:
- rev:
1.137
date: 2024/02/10 07:52:47
- user: cg
- file: RBScanner.st directory: goodies/refactoryBrowser/parser
- module: stx stc-classLibrary: parser
- Author:
- cg
documentation to be added.
class:
<a short class summary here, describing what instances represent>
responsibilities:
<describing what my main role is>
collaborators:
<describing with whom and how I talk to>
API:
<public api and main messages>
example:
<a one-line examples on how to use - can also be in a separate example method>
implementation:
<implementation points>
[instance variables:]
[class variables:]
accessing
-
classificationTable
-
-
metaVariableCharacter
-
-
patternVariableCharacter
-
class initialization
-
initialize
-
plus-or-minus
Usage example(s):
self initializeChars: '().:;[]^' to: #special.
|
Usage example(s):
-
initializeChars: characters to: aSymbol
-
instance creation
-
on: aStream
-
-
on: aStream errorBlock: aBlock
-
-
rewriteOn: aStream
-
-
rewriteOn: aStream errorBlock: aBlock
-
-
rewriteSavingCommentsOn: aStream
-
-
rewriteSavingCommentsOn: aStream errorBlock: aBlock
-
-
searchOn: aStream errorBlock: aBlock
-
testing
-
isSelector: aSymbol
-
-
isVariable: aString
-
accessing
-
addToCommentsBeforeToken: aCollection
-
-
classificationTable: anObject
-
-
contents
-
(comment from inherited method)
return the entire contents of the stream.
For a readStream, that is the rest (i.e. upToEnd),
for a writeStream, that is the collected data. As we do not know here,
what we are, this is the responsibility of a subclass...
-
currentCharacter
-
-
currentPosition
-
-
errorBlock: aBlock
-
-
extendedLanguage
-
-
extendedLanguage: aBoolean
-
-
flush
-
-
forceStringContinuation: typeOfString
-
a hack to enforce a fragment of an eString or iString to be returned
See parser
-
getComments
-
-
getCommentsAfterToken
-
-
getCommentsAfterTokenIfInLine: lineNrArg
-
-
getCommentsBeforeToken
-
-
ignoreComments
-
-
nextPut: anObject
-
Provide an error notification that the receiver does not
implement this message.
-
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.
-
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.
-
saveComments
-
-
saveComments: aBoolean
-
-
tokenLineNumber
-
-
tokenStart
-
error handling
-
errorBlock
-
-
errorPosition
-
-
scannerError: aString
-
Evaluate the block. If it returns raise an error
initialization & release
-
allowMatchCharsInSelector: aBoolean
-
special for DWIM: if true, a star is allowed inside a selector,
and this will be completed by matching selectors
-
initializeForIBM
-
-
initializeForSmalltalkX
-
-
initializeForSqueak
-
-
initializeForVisualWorks
-
-
on: aStream
-
OrderedCollection new.
private
-
bufferContents
-
-
classify: aCharacter
-
-
previousStepPosition
-
-
step
-
fetches the next currentCharacter and assigns the classified characterType
private-scanning
-
scanAnySymbol
-
-
scanBinary: aClass alreadyRead: prevCharacter
-
This doesn't parse according to the ANSI draft. It only parses 1 or 2 letter binary tokens.
-
scanByteArray
-
-
scanExponentMultipler
-
Did not read a valid exponent, e must be start of a message send
-
scanExtendedLiterals
-
-
scanExtendedSymbol
-
scan symbols like #. which are allowed by Squeak and ST/X but aren't standard
-
scanIdentifierOrKeyword
-
special: c'...' or e'...' is scanned as a C-string
-
scanLiteralArray
-
-
scanLiteralCString: nodeClass
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
scanLiteralCharacter
-
$
-
scanLiteralSTXSpecialStringWithType: stringTypePrefix
-
stringTypePrefix is one of 'c', 'e', 'i' or 'r';
the initial quote MUST have already been read
-
scanLiteralString
-
-
scanLiteralString: class
-
-
scanName
-
scan over alphanumeric characters.
collect in buffer
-
scanNamespaceName
-
-
scanNumber
-
numberType is either: scanNumberIBM or scanNumberVisualWorks,
-
scanNumberIBM
-
-
scanNumberOfBase: anInteger
-
Scan a number. Return the number or nil if the current input isn't a valid number.
-
scanNumberVisualWorks
-
that's actually ST/X - not VisualWorks
-
scanNumberWithoutExponent
-
Scan an IBM number with the radix -- don't scan the exponent though
-
scanOldStyleAssignOrIdentifier
-
invoked when an underscore is encountered
-
scanPatternVariable
-
ST/X new: `' makes it a regex-string '
-
scanQualifier
-
-
scanSTXPrimitiveCode
-
scan an inline C-primitive; % { has already been read.
-
scanSpecialCharacter
-
bad hack - must not skip spaces after the brace
-
scanStringSymbol
-
-
stripCommentInto: whichCommentCollection
-
an EOL comment; stop is the char pos BEFORE the cr
-
stripSeparators
-
-
stripSeparatorsAndCommentsInto: whichCommentCollection
-
scanning
-
next
-
The EOF token should occur after the end of input
-
scanBinary: tokenClass
-
scan a binary selector.
Special:
in '-<digit>', the '-' is scanned as a sign;
this affects code like: 0@-1,
which has a '@' selector and -1 as arg,
not '@-' and 1 as arg.
-
scanLiteral
-
-
scanLiteralArrayParts
-
-
scanSymbol
-
Squeak symbols may begin with a colon
-
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
-
atEnd
-
(comment from inherited method)
return true if the end of the stream has been reached;
- we do not know here how to do it, it must be redefined in subclass
-
isReadable
-
-
isWritable
-
|