eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SunRPC::XDRScanner':

Home

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

Class: XDRScanner (in SunRPC)


Inheritance:

   Object
   |
   +--Scanner
      |
      +--SunRPC::XDRScanner

Package:
stx:goodies/communication
Category:
Net-Communication-SunRPC-XDR_IDL
Version:
rev: 1.12 date: 2017/11/18 09:52:03
user: cg
file: SunRPC_XDRScanner.st directory: goodies/communication
module: stx stc-classLibrary: communication
Author:
Claus Gittinger

Description:


scanner for XDR-definition files - provides token scanning functionality
for the XDRParser. (normally not used by its own).
XDR is the IDL of SunRPC.


Class protocol:

initialization
o  initialize
(comment from inherited method)
initialize the classes defaults. Typically, these are changed
later in the 'private.rc' file.

o  setupActions
initialize the scanners actionTables - these are used to dispatch
into scanner methods as characters are read
usage example(s):
     XDRScanner setupActions

o  update: something with: parameter from: changedObject
bug work-around (compiled cheap blocks loose their code)


Instance protocol:

accessing
o  newSource: aStringOrStream

o  source

initialization
o  initialize
initialize the scanner

private
o  checkForKeyword: string
check if string is a keyword (as opposed to an identifier).

o  isCommentCharacter: ch
return true, if ch is the comment-start character

o  pushBack: aToken

o  skipForClosing: closingToken with: openingToken

reading next token
o  nextCharacter
a single quote has been scanned; scan the character-string (caring for quotes).
TODO: C-escapes; \0xx; \0xxx

o  nextEq
'=' has been read - look for another '='

o  nextGT
'>' has been read - look for another '>'

o  nextLT
'<' has been read - look for another '<'

o  nextMinus
'-' has been read - look for another '-'

o  nextNumber
a digit has been read; scan a number (0xfoo / 0octal / decimal or float).
if specialFloat is true, return float value as hi.low (for version numbers)

o  nextPlus
'+' has been read - look for another '+'

o  nextSlash
'/' has been read - next could be:
'/' - EOL comment
'*' - regular comment

o  nextString
a doubled quote has been scanned; scan the string (caring for doubled quotes

o  nextToken
return the next token from my source-stream

specials
o  readingStream: aStream do: aBlock

o  restOfLine



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 04 Aug 2025 14:26:44 GMT