net.sourceforge.czt.print.z
Class SectHeadScanner
java.lang.Object
net.sourceforge.czt.print.z.SectHeadScanner
- All Implemented Interfaces:
- net.sourceforge.czt.java_cup.runtime.Scanner
public class SectHeadScanner
- extends java.lang.Object
- implements net.sourceforge.czt.java_cup.runtime.Scanner
This is a scanner that creates SECTHEAD tokens of type ZSect
for section headers.
In most cases, it just forwards the stream of tokens unchanged
via the #next_token method. When it encounters a ZED token followed
by a SECTION token (the beginning of a section header), it parses untill
the end of the section header definition and returns a SECTHEAD token
whos type is a ZSect containing all the parsed information. If no section
header definition can be found, one is included before the first non-text
token. Parser using this scanner do not need to care about anonymous
specifications.
- Author:
- Petra Malik
|
Constructor Summary |
SectHeadScanner(net.sourceforge.czt.java_cup.runtime.Scanner scanner)
|
|
Method Summary |
static boolean |
isAnonymous(net.sourceforge.czt.z.ast.ZSect zsect)
|
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 |
SectHeadScanner
public SectHeadScanner(net.sourceforge.czt.java_cup.runtime.Scanner scanner)
next_token
public net.sourceforge.czt.java_cup.runtime.Symbol next_token()
throws java.lang.Exception
- Specified by:
next_token in interface net.sourceforge.czt.java_cup.runtime.Scanner
- Throws:
java.lang.Exception
isAnonymous
public static boolean isAnonymous(net.sourceforge.czt.z.ast.ZSect zsect)
Copyright © 2003-2007 Community Z Tools Project. All Rights Reserved.