Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ide
Class VerilogScanner  view VerilogScanner download VerilogScanner.java

java.lang.Object
  extended byide.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)  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, toString, wait, wait, wait
 

Field Detail

tokSLComm

public static final int tokSLComm
See Also:
Constant Field Values

tokMLComm

public static final int tokMLComm
See Also:
Constant Field Values

tokBinNr

public static final int tokBinNr
See Also:
Constant Field Values

tokOctNr

public static final int tokOctNr
See Also:
Constant Field Values

tokDecNr

public static final int tokDecNr
See Also:
Constant Field Values

tokHexNr

public static final int tokHexNr
See Also:
Constant Field Values

tokFloatNr

public static final int tokFloatNr
See Also:
Constant Field Values

tokKeyword

public static final int tokKeyword
See Also:
Constant Field Values

tokPreproc

public static final int tokPreproc
See Also:
Constant Field Values

tokSysTask

public static final int tokSysTask
See Also:
Constant Field Values

tokSeparator

public static final int tokSeparator
See Also:
Constant Field Values

tokString

public static final int tokString
See Also:
Constant Field Values

tokStuff

public static final int tokStuff
See Also:
Constant Field Values

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

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()

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)