diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 11:13:31 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 11:13:31 +0900 |
commit | 6034e81193d784e8af78fa8ab56438ab1e0d7839 (patch) | |
tree | 27f894681430b733eb8711442a4c9312b7cc3535 /vhdlparser/CharStream.cc | |
parent | 3b6ea7abb3d529f7805ed54071d597f01b578740 (diff) | |
download | doxygen-6034e81193d784e8af78fa8ab56438ab1e0d7839.tar.gz doxygen-6034e81193d784e8af78fa8ab56438ab1e0d7839.tar.bz2 doxygen-6034e81193d784e8af78fa8ab56438ab1e0d7839.zip |
Imported Upstream version 1.8.18upstream/1.8.18
Diffstat (limited to 'vhdlparser/CharStream.cc')
-rw-r--r-- | vhdlparser/CharStream.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vhdlparser/CharStream.cc b/vhdlparser/CharStream.cc index 65179f5..05003ef 100644 --- a/vhdlparser/CharStream.cc +++ b/vhdlparser/CharStream.cc @@ -1,4 +1,4 @@ -/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 6.2 */ +/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 7.0 */ /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ #include "CharStream.h" @@ -12,8 +12,8 @@ void ArrayCopy(T* src, int src_offset, T* dest, int dest_offset, int len) { class StringReaderStream : public ReaderStream { public: - StringReaderStream(const JAVACC_STRING_TYPE& str) : str_(str), cur_(0), max_(str.size()) {} - virtual size_t read(JAVACC_CHAR_TYPE *bufptr, int offset, size_t len) { + StringReaderStream(const JJString& str) : str_(str), cur_(0), max_(str.size()) {} + virtual size_t read(JJChar *bufptr, int offset, size_t len) { size_t count = str_.copy(bufptr + offset, len > max_ ? max_ : len, cur_); cur_ += count; max_ -= count; @@ -25,7 +25,7 @@ class StringReaderStream : public ReaderStream { } private: - const JAVACC_STRING_TYPE str_; + const JJString str_; size_t cur_; size_t max_; }; @@ -33,7 +33,7 @@ class StringReaderStream : public ReaderStream { namespace vhdl { namespace parser { -void CharStream::ReInit(const JAVACC_STRING_TYPE& str, int startline, +void CharStream::ReInit(const JJString& str, int startline, int startcolumn, int buffersize) { StringReaderStream *stream = new StringReaderStream(str); ReInit(stream, startline, startcolumn, buffersize); @@ -46,12 +46,12 @@ void CharStream::ReInit(ReaderStream *input_stream, int startline, delete inputStream; } - if (buffer != NULL) { + if (buffer) { DeleteBuffers(); } available = bufsize = buffersize; - buffer = new JAVACC_CHAR_TYPE[buffersize]; + buffer = new JJChar[buffersize]; bufline = new int[buffersize]; bufcolumn = new int[buffersize]; @@ -111,7 +111,7 @@ void CharStream::adjustBeginLineColumn(int newLine, int newCol) { } void CharStream::ExpandBuff(bool wrapAround) { - JAVACC_CHAR_TYPE *newbuffer = new JAVACC_CHAR_TYPE[bufsize + 2048]; + JJChar *newbuffer = new JJChar[bufsize + 2048]; int *newbufline = new int[bufsize + 2048]; int *newbufcolumn = new int[bufsize + 2048]; @@ -160,7 +160,7 @@ void CharStream::FillBuff() { } } - int i = inputStream->read(buffer, maxNextCharInd, available - maxNextCharInd); + size_t i = inputStream->read(buffer, maxNextCharInd, available - maxNextCharInd); if (i > 0) { maxNextCharInd += i; } else { @@ -172,7 +172,7 @@ void CharStream::FillBuff() { } } -void CharStream::UpdateLineColumn(JAVACC_CHAR_TYPE c) { +void CharStream::UpdateLineColumn(JJChar c) { column++; if (prevCharIsLF) { prevCharIsLF = false; @@ -209,4 +209,4 @@ void CharStream::UpdateLineColumn(JAVACC_CHAR_TYPE c) { } } -/* JavaCC - OriginalChecksum=ade3c1b57a731a003629de593814ffa6 (do not edit this line) */ +/* JavaCC - OriginalChecksum=0ba78d6c493d812eba61de6fa794fd15 (do not edit this line) */ |