Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ParserMatchEvent.java
Package: antlr-2_7_0.zip [view]
Upload User: afrynkmhm
Upload Date: 2007-01-06
Package Size: 1262k
Code Size: 2k
Category:
Compiler program
Development Platform:
Others
- package antlr.debug;
- public class ParserMatchEvent extends GuessingEvent {
- // NOTE: for a mismatch on type STRING, the "text" is used as the lookahead
- // value. Normally "value" is this
- public static int TOKEN=0;
- public static int BITSET=1;
- public static int CHAR=2;
- public static int CHAR_BITSET=3;
- public static int STRING=4;
- public static int CHAR_RANGE=5;
- private boolean inverse;
- private boolean matched;
- private Object target;
- private int value;
- private String text;
- public ParserMatchEvent(Object source) {
- super(source);
- }
- public ParserMatchEvent(Object source, int type,
- int value, Object target, String text, int guessing,
- boolean inverse, boolean matched) {
- super(source);
- setValues(type,value,target,text,guessing,inverse,matched);
- }
- public Object getTarget() {
- return target;
- }
- public String getText() {
- return text;
- }
- public int getValue() {
- return value;
- }
- public boolean isInverse() {
- return inverse;
- }
- public boolean isMatched() {
- return matched;
- }
- void setInverse(boolean inverse) {
- this.inverse = inverse;
- }
- void setMatched(boolean matched) {
- this.matched = matched;
- }
- void setTarget(Object target) {
- this.target = target;
- }
- void setText(String text) {
- this.text = text;
- }
- void setValue(int value) {
- this.value = value;
- }
- /** This should NOT be called from anyone other than ParserEventSupport! */
- void setValues(int type, int value, Object target, String text, int guessing, boolean inverse, boolean matched) {
- super.setValues(type, guessing);
- setValue(value);
- setTarget(target);
- setInverse(inverse);
- setMatched(matched);
- setText(text);
- }
- public String toString() {
- return "ParserMatchEvent [" +
- (isMatched()?"ok,":"bad,") +
- (isInverse()?"NOT ":"") +
- (getType()==TOKEN?"token,":"bitset,") +
- getValue() + "," + getTarget() + "," + getGuessing() + "]";
- }
- }