1 /* ANTLRTokenStream.h 2 * 3 * SOFTWARE RIGHTS 4 * 5 * We reserve no LEGAL rights to the Purdue Compiler Construction Tool 6 * Set (PCCTS) -- PCCTS is in the public domain. An individual or 7 * company may do whatever they wish with source code distributed with 8 * PCCTS or the code generated by PCCTS, including the incorporation of 9 * PCCTS, or its output, into commerical software. 10 * 11 * We encourage users to develop software with PCCTS. However, we do ask 12 * that credit is given to us for developing PCCTS. By "credit", 13 * we mean that if you incorporate our source code into one of your 14 * programs (commercial product, research project, or otherwise) that you 15 * acknowledge this fact somewhere in the documentation, research report, 16 * etc... If you like PCCTS and have developed a nice tool with the 17 * output, please mention that you developed it using PCCTS. In 18 * addition, we ask that this header remain intact in our source code. 19 * As long as these guidelines are kept, we expect to continue enhancing 20 * this system and expect to make other tools available as they are 21 * completed. 22 * 23 * ANTLR 1.33 24 * Terence Parr 25 * Parr Research Corporation 26 * with Purdue University and AHPCRC, University of Minnesota 27 * 1989-1998 28 */ 29 30 #ifndef ATOKENSTREAM_H_GATE 31 #define ATOKENSTREAM_H_GATE 32 33 #include "pcctscfg.h" 34 35 /* This is really a behavior or protocol; it merely indicates the behavior 36 * required of the input and output of an ANTLRTokenBuffer. You could 37 * subclass it, but you can also just pass any old pointer to ANTLRTokenBuffer 38 * with a type cast (in which case, your getANTLRToken() would have to 39 * explicitly cast the input pointer to your REAL type (typically your lexer)). 40 */ 41 42 class ANTLRParser; // MR1 43 44 class DllExportPCCTS ANTLRTokenStream { 45 public: 46 virtual _ANTLRTokenPtr getToken() = 0; 47 virtual ANTLRParser * setParser(ANTLRParser *p) {return 0; }; // MR12 48 virtual ANTLRParser * getParser() { return 0; }; // MR12 49 }; 50 51 #endif 52