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
BufFileInput.h
Package: pccts133.zip [view]
Upload User: itx_2006
Upload Date: 2007-01-06
Package Size: 493k
Code Size: 1k
Category:
Compiler program
Development Platform:
Others
- // FILE: BufFileInput.h
- // AUTHOR: Alexey Demakov (AVD) demakov@kazbek.ispras.ru
- // CREATION: 26-JAN-1998
- // DESCRIPTION: File Input Stream with lookahead for Scanner
- // Tested under Win32 with ANTLR 1.33 MR10 and MSVC 5.0
- // Change History:
- //
- // 28-May-1998 Add virtual destructor to release buffer
- // Manfred Kogler (km@cast.uni-linz.ac.at)
- // (1.33MR14)
- #ifndef BufFileInput_h
- #define BufFileInput_h
- #include "pcctscfg.h"
- #include PCCTS_STDIO_H
- PCCTS_NAMESPACE_STD
- #include "DLexerBase.h"
- class DllExportPCCTS BufFileInput : public DLGInputStream
- {
- public:
- // constructor
- // f - input stream
- // buf_size - size of buffer (maximal length for string in is_in)
- BufFileInput(FILE *f, int buf_size = 8 );
- virtual ~BufFileInput();
- // gets next char from stream
- virtual int nextChar( void );
- // looks in stream and compares next l characters with s
- // returns the result of comparision
- int lookahead( char* s );
- private:
- FILE *input; // input stream;
- int* buf; // buffer
- int size; // size of buffer
- int start; // position of the first symbol in buffer
- int len; // count of characters in buffers
- };
- #endif
- // end of file BufFileInput.h