ide
Class VerilogScanner

java.lang.Object
  |
  +--ide.VerilogScanner

class VerilogScanner
extends java.lang.Object

Provides a color for each verilog token


Field Summary
(package private)  char[] a
           
(package private)  int c
          The pointer inside the current segment
(package private)  char[][] keyBuffer1
           
(package private)  char[][] keyBuffer2
           
(package private) static char[][][] keys
          Stores vectors alphabetically ordered.
(package private) static int[] keysLengths
          How many keys are into each vector.
(package private) static java.lang.String[] keywords
           
(package private) static int kSize
           
(package private)  boolean openComment
          true if an open "/*" was found on this line
(package private)  int start
           
(package private)  int stop
           
static int tokBinNr
           
static int tokDecNr
           
static int tokFloatNr
           
static int tokHexNr
           
static int tokKeyword
           
(package private)  int tokLen
           
static int tokMLComm
           
static int tokOctNr
           
static int tokPreproc
           
static int tokSeparator
           
static int tokSLComm
           
static int tokString
           
static int tokStuff
           
static int tokSysTask
           
(package private)  int tokType
           
 
Constructor Summary
(package private) VerilogScanner()
           
 
Method Summary
(package private) static void ()
           
(package private)  void debug(java.lang.String s)
           
(package private)  boolean getToken()
           
(package private)  void init(javax.swing.text.Segment s)
           
(package private) static boolean isAlpha(char c)
           
(package private) static boolean isAlpha1(char c)
           
(package private) static boolean isDigit(char c)
           
(package private) static boolean isKeywordConstituent(char c)
          We could use isAlpha, but as u see from the keyword table, there appear only lower case words an tha characters '0' ad '1', so we can shrink the number of tests.
static void main(java.lang.String[] args)
           
(package private)  void matchKeyword()
          Checks whether there is a kwyword starting at tha current point or not and sets the tokType accordingly.
(package private)  boolean noMoreTokens()
          no more tears !
(package private)  boolean scanCommentEnd()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

tokSLComm

public static final int tokSLComm

tokMLComm

public static final int tokMLComm

tokBinNr

public static final int tokBinNr

tokOctNr

public static final int tokOctNr

tokDecNr

public static final int tokDecNr

tokHexNr

public static final int tokHexNr

tokFloatNr

public static final int tokFloatNr

tokKeyword

public static final int tokKeyword

tokPreproc

public static final int tokPreproc

tokSysTask

public static final int tokSysTask

tokSeparator

public static final int tokSeparator

tokString

public static final int tokString

tokStuff

public static final int tokStuff

tokType

int tokType

tokLen

int tokLen

openComment

boolean openComment
true if an open "/*" was found on this line

a

char[] a

start

int start

stop

int stop

keywords

static java.lang.String[] keywords

kSize

static int kSize

keys

static char[][][] keys
Stores vectors alphabetically ordered. Each of these vectors contains all the keywords that start with the same letter. There should be no more than 30 sorts of starting characters and 15 keywords starting with the same letter.

keysLengths

static int[] keysLengths
How many keys are into each vector.

keyBuffer1

char[][] keyBuffer1

keyBuffer2

char[][] keyBuffer2

c

int c
The pointer inside the current segment
Constructor Detail

VerilogScanner

VerilogScanner()
Method Detail

static void ()

init

final void init(javax.swing.text.Segment s)

noMoreTokens

final boolean noMoreTokens()
no more tears !

getToken

final boolean getToken()

debug

void debug(java.lang.String s)

matchKeyword

void matchKeyword()
Checks whether there is a kwyword starting at tha current point or not and sets the tokType accordingly. The c pointer is advanced to the first unmatched character.

scanCommentEnd

boolean scanCommentEnd()
Returns:
true if the multiline comment ends on this line

isKeywordConstituent

static final boolean isKeywordConstituent(char c)
We could use isAlpha, but as u see from the keyword table, there appear only lower case words an tha characters '0' ad '1', so we can shrink the number of tests.

isAlpha

static final boolean isAlpha(char c)

isAlpha1

static final boolean isAlpha1(char c)

isDigit

static final boolean isDigit(char c)

main

public static void main(java.lang.String[] args)