GME
13
|
00001 /* ANTLRTokenStream.h 00002 * 00003 * SOFTWARE RIGHTS 00004 * 00005 * We reserve no LEGAL rights to the Purdue Compiler Construction Tool 00006 * Set (PCCTS) -- PCCTS is in the public domain. An individual or 00007 * company may do whatever they wish with source code distributed with 00008 * PCCTS or the code generated by PCCTS, including the incorporation of 00009 * PCCTS, or its output, into commerical software. 00010 * 00011 * We encourage users to develop software with PCCTS. However, we do ask 00012 * that credit is given to us for developing PCCTS. By "credit", 00013 * we mean that if you incorporate our source code into one of your 00014 * programs (commercial product, research project, or otherwise) that you 00015 * acknowledge this fact somewhere in the documentation, research report, 00016 * etc... If you like PCCTS and have developed a nice tool with the 00017 * output, please mention that you developed it using PCCTS. In 00018 * addition, we ask that this header remain intact in our source code. 00019 * As long as these guidelines are kept, we expect to continue enhancing 00020 * this system and expect to make other tools available as they are 00021 * completed. 00022 * 00023 * ANTLR 1.33 00024 * Terence Parr 00025 * Parr Research Corporation 00026 * with Purdue University and AHPCRC, University of Minnesota 00027 * 1989-1998 00028 */ 00029 00030 #ifndef ATOKENSTREAM_H_GATE 00031 #define ATOKENSTREAM_H_GATE 00032 00033 /* This is really a behavior or protocol; it merely indicates the behavior 00034 * required of the input and output of an ANTLRTokenBuffer. You could 00035 * subclass it, but you can also just pass any old pointer to ANTLRTokenBuffer 00036 * with a type cast (in which case, your getANTLRToken() would have to 00037 * explicitly cast the input pointer to your REAL type (typically your lexer)). 00038 */ 00039 00040 class ANTLRParser; // MR1 00041 00042 class ANTLRTokenStream { 00043 public: 00044 virtual _ANTLRTokenPtr getToken() = 0; 00045 virtual ANTLRParser * setParser(ANTLRParser *p) {return NULL;}; // MR1 00046 virtual ANTLRParser * getParser() { return NULL; }; // MR1 00047 }; 00048 00049 #endif