net.sourceforge.czt.parser.z
Class KeywordScanner

java.lang.Object
  extended by net.sourceforge.czt.parser.z.KeywordScanner
All Implemented Interfaces:
net.sourceforge.czt.java_cup.runtime.Scanner

public class KeywordScanner
extends java.lang.Object
implements net.sourceforge.czt.java_cup.runtime.Scanner

This is a keyword lexer (part of context-sensitive lexis) for Z specifications in unicode format.

According to the ISO Standard for Z, the lexis for Z specifications consists of two phases: the context-free lexis and the context-sensitive lexis. This class is an implementation of sections 7.4.2 and 7.4.3 of the ISO Z standard, which describes the context-sensitive lexis.

This class transforms a stream of tokens into another stream of tokens. The input is usually provided by the ContextFreeScanner. Each DECORWORD token whos spelling is exactly that of a keyword is mapped to the corresponding keyword token. All other tokens are left unchanged.


Constructor Summary
KeywordScanner(ContextFreeScanner scanner, java.util.Properties properties)
           
 
Method Summary
 net.sourceforge.czt.java_cup.runtime.Symbol next_token()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeywordScanner

public KeywordScanner(ContextFreeScanner scanner,
                      java.util.Properties properties)
Method Detail

next_token

public net.sourceforge.czt.java_cup.runtime.Symbol next_token()
                                                       throws java.io.IOException
Specified by:
next_token in interface net.sourceforge.czt.java_cup.runtime.Scanner
Throws:
java.io.IOException


Copyright © 2003-2007 Community Z Tools Project. All Rights Reserved.