## com.ibm.lab.soln.sqleditor.sql
Class SQLCodeScanner

    java.lang.Object
      |
      +--org.eclipse.jface.text.rules.RuleBasedScanner
            |
            +--com.ibm.lab.soln.sqleditor.sql.SQLCodeScanner

All Implemented Interfaces:
  org.eclipse.jface.text.rules.ICharacterScanner, ISQLSyntax, org.eclipse.jface.text.rules.ITokenScanner

public class SQLCodeScanner
extends org.eclipse.jface.text.rules.RuleBasedScanner
implements ISQLSyntax

The SQLCodeScanner is a RuleBaseScanner.This class finds SQL comments and keywords, as the user edits the document. It is "programmed" with a sequence of rules that evaluates and returns the offset and the length of the last found token.

Fields inherited from class org.eclipse.jface.text.rules.RuleBasedScanner
`fColumn, fDefaultReturnToken, fDelimiters, fDocument, fOffset, fRangeEnd, fRules, fTokenOffset, UNDEFINED`

Fields inherited from interface com.ibm.lab.soln.sqleditor.sql.ISQLSyntax
`allWords, constants, functions, predicates, reservedwords, types`

Fields inherited from interface org.eclipse.jface.text.rules.ICharacterScanner
`EOF`

Constructor Summary
`SQLCodeScanner()` Constructor for SQLCodeScanner.

Methods inherited from class org.eclipse.jface.text.rules.RuleBasedScanner
`getColumn, getLegalLineDelimiters, getTokenLength, getTokenOffset, nextToken, read, setDefaultReturnToken, setRange, setRules, unread`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SQLCodeScanner

    public SQLCodeScanner()

  Constructor for SQLCodeScanner. The SQLCodeScanner, is a RuleBaseScanner. The code scanner creates tokens for keywords, types, and constants. The token is constructed with a TextAttribute. The TextAttribute is constructed with a color and font. A list of rules with the corresponding token are created. The method ends with setting the scanner’s set of rules