diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-12-23 13:18:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-23 13:18:30 (GMT) |
commit | 9cafaedb50c8e430cc8c34ef44a84bc1dbcb64ad (patch) | |
tree | ffee9d6d930022c55710bc0931d0da6a77be27f0 /vhdlparser/CharStream.cc | |
parent | c9284a1aae6e876e0399c4757837bec3563751e2 (diff) | |
parent | ecc4f838db18336c4afbc6dabb1a8edbc6d8bbd0 (diff) | |
download | Doxygen-9cafaedb50c8e430cc8c34ef44a84bc1dbcb64ad.zip Doxygen-9cafaedb50c8e430cc8c34ef44a84bc1dbcb64ad.tar.gz Doxygen-9cafaedb50c8e430cc8c34ef44a84bc1dbcb64ad.tar.bz2 |
Merge branch 'master' into spelling
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 05003ef..65179f5 100644 --- a/vhdlparser/CharStream.cc +++ b/vhdlparser/CharStream.cc @@ -1,4 +1,4 @@ -/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 7.0 */ +/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 6.2 */ /* 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 JJString& str) : str_(str), cur_(0), max_(str.size()) {} - virtual size_t read(JJChar *bufptr, int offset, size_t len) { + 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) { 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 JJString str_; + const JAVACC_STRING_TYPE str_; size_t cur_; size_t max_; }; @@ -33,7 +33,7 @@ class StringReaderStream : public ReaderStream { namespace vhdl { namespace parser { -void CharStream::ReInit(const JJString& str, int startline, +void CharStream::ReInit(const JAVACC_STRING_TYPE& 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) { + if (buffer != NULL) { DeleteBuffers(); } available = bufsize = buffersize; - buffer = new JJChar[buffersize]; + buffer = new JAVACC_CHAR_TYPE[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) { - JJChar *newbuffer = new JJChar[bufsize + 2048]; + JAVACC_CHAR_TYPE *newbuffer = new JAVACC_CHAR_TYPE[bufsize + 2048]; int *newbufline = new int[bufsize + 2048]; int *newbufcolumn = new int[bufsize + 2048]; @@ -160,7 +160,7 @@ void CharStream::FillBuff() { } } - size_t i = inputStream->read(buffer, maxNextCharInd, available - maxNextCharInd); + int i = inputStream->read(buffer, maxNextCharInd, available - maxNextCharInd); if (i > 0) { maxNextCharInd += i; } else { @@ -172,7 +172,7 @@ void CharStream::FillBuff() { } } -void CharStream::UpdateLineColumn(JJChar c) { +void CharStream::UpdateLineColumn(JAVACC_CHAR_TYPE c) { column++; if (prevCharIsLF) { prevCharIsLF = false; @@ -209,4 +209,4 @@ void CharStream::UpdateLineColumn(JJChar c) { } } -/* JavaCC - OriginalChecksum=0ba78d6c493d812eba61de6fa794fd15 (do not edit this line) */ +/* JavaCC - OriginalChecksum=ade3c1b57a731a003629de593814ffa6 (do not edit this line) */ |