KiCad PCB EDA Suite
|
Implement a lexical analyzer for the SPECCTRA DSN file format. More...
#include <dsnlexer.h>
Public Member Functions | |
DSNLEXER (const KEYWORD *aKeywordTable, unsigned aKeywordCount, const KEYWORD_MAP *aKeywordMap, FILE *aFile, const wxString &aFileName) | |
Initialize a DSN lexer and prepares to read from aFile which is already open and has aFilename. More... | |
DSNLEXER (const KEYWORD *aKeywordTable, unsigned aKeywordCount, const KEYWORD_MAP *aKeywordMap, const std::string &aSExpression, const wxString &aSource=wxEmptyString) | |
Initialize a DSN lexer and prepares to read from aSExpression. More... | |
DSNLEXER (const std::string &aSExpression, const wxString &aSource=wxEmptyString) | |
Initialize a DSN lexer and prepares to read from aSExpression. More... | |
DSNLEXER (const KEYWORD *aKeywordTable, unsigned aKeywordCount, const KEYWORD_MAP *aKeywordMap, LINE_READER *aLineReader=nullptr) | |
Initialize a DSN lexer and prepares to read from aLineReader which is already open, and may be in use by other DSNLEXERs also. More... | |
virtual | ~DSNLEXER () |
void | InitParserState () |
Reinit variables used during parsing, to ensure od states are not used in a new parsing must be called before parsing a new file after parsing an old file to avoid starting with some variables in a non initial state. More... | |
bool | SyncLineReaderWith (DSNLEXER &aLexer) |
Usable only for DSN lexers which share the same LINE_READER. More... | |
void | SetSpecctraMode (bool aMode) |
Change the behavior of this lexer into or out of "specctra mode". More... | |
void | PushReader (LINE_READER *aLineReader) |
Manage a stack of LINE_READERs in order to handle nested file inclusion. More... | |
LINE_READER * | PopReader () |
Delete the top most LINE_READER from an internal stack of LINE_READERs and in the case of FILE_LINE_READER this means the associated FILE is closed. More... | |
int | NextTok () |
Return the next token found in the input file or DSN_EOF when reaching the end of file. More... | |
int | NeedSYMBOL () |
Call NextTok() and then verifies that the token read in satisfies IsSymbol(). More... | |
int | NeedSYMBOLorNUMBER () |
Call NextTok() and then verifies that the token read in satisfies bool IsSymbol() or the next token is DSN_NUMBER. More... | |
int | NeedNUMBER (const char *aExpectation) |
Call NextTok() and then verifies that the token read is type DSN_NUMBER. More... | |
int | CurTok () const |
Return whatever NextTok() returned the last time it was called. More... | |
int | PrevTok () const |
Return whatever NextTok() returned the 2nd to last time it was called. More... | |
int | GetCurStrAsToken () const |
Used to support "loose" matches (quoted tokens). More... | |
char | SetStringDelimiter (char aStringDelimiter) |
Change the string delimiter from the default " to some other character and return the old value. More... | |
bool | SetSpaceInQuotedTokens (bool val) |
Change the setting controlling whether a space in a quoted string isa terminator. More... | |
bool | SetCommentsAreTokens (bool val) |
Change the handling of comments. More... | |
wxArrayString * | ReadCommentLines () |
Check the next sequence of tokens and reads them into a wxArrayString if they are comments. More... | |
void | Expecting (int aTok) const |
Throw an IO_ERROR exception with an input file specific error message. More... | |
void | Expecting (const char *aTokenList) const |
Throw an IO_ERROR exception with an input file specific error message. More... | |
void | Unexpected (int aTok) const |
Throw an IO_ERROR exception with an input file specific error message. More... | |
void | Unexpected (const char *aToken) const |
Throw an IO_ERROR exception with an input file specific error message. More... | |
void | Duplicate (int aTok) |
Throw an IO_ERROR exception with a message saying specifically that aTok is a duplicate of one already seen in current context. More... | |
void | NeedLEFT () |
Call NextTok() and then verifies that the token read in is a DSN_LEFT. More... | |
void | NeedRIGHT () |
Call NextTok() and then verifies that the token read in is a DSN_RIGHT. More... | |
const char * | GetTokenText (int aTok) const |
Return the C string representation of a DSN_T value. More... | |
wxString | GetTokenString (int aTok) const |
Return a quote wrapped wxString representation of a token value. More... | |
const char * | CurText () const |
Return a pointer to the current token's text. More... | |
const std::string & | CurStr () const |
Return a reference to current token in std::string form. More... | |
wxString | FromUTF8 () const |
Return the current token text as a wxString, assuming that the input byte stream is UTF8 encoded. More... | |
int | CurLineNumber () const |
Return the current line number within my LINE_READER. More... | |
const char * | CurLine () const |
Return the current line of text from which the CurText() would return its token. More... | |
const wxString & | CurSource () const |
Return the current LINE_READER source. More... | |
int | CurOffset () const |
Return the byte offset within the current line, using a 1 based index. More... | |
Static Public Member Functions | |
static bool | IsSymbol (int aTok) |
Test a token to see if it is a symbol. More... | |
static const char * | Syntax (int aTok) |
Protected Types | |
typedef std::vector< LINE_READER * > | READER_STACK |
Protected Member Functions | |
void | init () |
int | readLine () |
int | findToken (const std::string &aToken) const |
Take aToken string and looks up the string in the keywords table. More... | |
bool | isStringTerminator (char cc) const |
double | parseDouble () |
Parse the current token as an ASCII numeric string with possible leading whitespace into a double precision floating point number. More... | |
double | parseDouble (const char *aExpected) |
template<typename T > | |
double | parseDouble (T aToken) |
Protected Attributes | |
bool | iOwnReaders |
on readerStack, should I delete them? More... | |
const char * | start |
const char * | next |
const char * | limit |
char | dummy [1] |
when there is no reader. More... | |
READER_STACK | readerStack |
all the LINE_READERs by pointer. More... | |
LINE_READER * | reader |
bool | specctraMode |
if true, then: 1) stringDelimiter can be changed 2) Kicad quoting protocol is not in effect 3) space_in_quoted_tokens is functional else not. More... | |
char | stringDelimiter |
bool | space_in_quoted_tokens |
blank spaces within quoted strings More... | |
bool | commentsAreTokens |
true if should return comments as tokens More... | |
int | prevTok |
curTok from previous NextTok() call. More... | |
int | curOffset |
offset within current line of the current token More... | |
int | curTok |
the current token obtained on last NextTok() More... | |
std::string | curText |
the text of the current token More... | |
const KEYWORD * | keywords |
table sorted by CMake for bsearch() More... | |
unsigned | keywordCount |
count of keywords table More... | |
const KEYWORD_MAP * | keywordsLookup |
fast, specialized "C string" hashtable More... | |
Implement a lexical analyzer for the SPECCTRA DSN file format.
It reads lexical tokens from the current LINE_READER through the NextTok() function.
Definition at line 78 of file dsnlexer.h.
|
protected |
Definition at line 528 of file dsnlexer.h.
DSNLEXER::DSNLEXER | ( | const KEYWORD * | aKeywordTable, |
unsigned | aKeywordCount, | ||
const KEYWORD_MAP * | aKeywordMap, | ||
FILE * | aFile, | ||
const wxString & | aFileName | ||
) |
Initialize a DSN lexer and prepares to read from aFile which is already open and has aFilename.
aKeywordTable | is an array of KEYWORDS holding aKeywordCount. This token table need not contain the lexer separators such as '(' ')', etc. |
aKeywordCount | is the count of tokens in aKeywordTable. |
aFile | is an open file, which will be closed when this is destructed. |
aFileName | is the name of the file |
Definition at line 55 of file dsnlexer.cpp.
References init(), and PushReader().
DSNLEXER::DSNLEXER | ( | const KEYWORD * | aKeywordTable, |
unsigned | aKeywordCount, | ||
const KEYWORD_MAP * | aKeywordMap, | ||
const std::string & | aSExpression, | ||
const wxString & | aSource = wxEmptyString |
||
) |
Initialize a DSN lexer and prepares to read from aSExpression.
aKeywordTable | is an array of KEYWORDS holding aKeywordCount. This token table need not contain the lexer separators such as '(' ')', etc. |
aKeywordCount | is the count of tokens in aKeywordTable. |
aSExpression | is text to feed through a STRING_LINE_READER |
aSource | is a description of aSExpression, used for error reporting. |
Definition at line 73 of file dsnlexer.cpp.
References FMT_CLIPBOARD, init(), and PushReader().
DSNLEXER::DSNLEXER | ( | const std::string & | aSExpression, |
const wxString & | aSource = wxEmptyString |
||
) |
Initialize a DSN lexer and prepares to read from aSExpression.
Use this one without a keyword table with the DOM parser in ptree.h.
aSExpression | is text to feed through a STRING_LINE_READER |
aSource | is a description of aSExpression, used for error reporting. |
Definition at line 112 of file dsnlexer.cpp.
References FMT_CLIPBOARD, init(), and PushReader().
DSNLEXER::DSNLEXER | ( | const KEYWORD * | aKeywordTable, |
unsigned | aKeywordCount, | ||
const KEYWORD_MAP * | aKeywordMap, | ||
LINE_READER * | aLineReader = nullptr |
||
) |
Initialize a DSN lexer and prepares to read from aLineReader which is already open, and may be in use by other DSNLEXERs also.
No ownership is taken of aLineReader. This enables it to be used by other DSNLEXERs.
aKeywordTable | is an array of #KEYWORDS holding aKeywordCount. This token table need not contain the lexer separators such as '(' ')', etc. |
aKeywordCount | is the count of tokens in aKeywordTable. |
aLineReader | is any subclassed instance of LINE_READER, such as STRING_LINE_READER or FILE_LINE_READER. No ownership is taken. |
Definition at line 92 of file dsnlexer.cpp.
References init(), and PushReader().
|
virtual |
Definition at line 129 of file dsnlexer.cpp.
References iOwnReaders, and readerStack.
|
inline |
Return the current line of text from which the CurText() would return its token.
Definition at line 431 of file dsnlexer.h.
Referenced by Duplicate(), Expecting(), NeedNUMBER(), NextTok(), parseDouble(), and Unexpected().
|
inline |
Return the current line number within my LINE_READER.
Definition at line 423 of file dsnlexer.h.
References LINE_READER::LineNumber(), and reader.
Referenced by Duplicate(), Expecting(), NeedNUMBER(), NextTok(), parseDouble(), and Unexpected().
|
inline |
Return the byte offset within the current line, using a 1 based index.
Definition at line 451 of file dsnlexer.h.
References curOffset.
Referenced by Duplicate(), Expecting(), NeedNUMBER(), NextTok(), parseDouble(), and Unexpected().
|
inline |
Return the current LINE_READER source.
Definition at line 441 of file dsnlexer.h.
References LINE_READER::GetSource(), and reader.
Referenced by Duplicate(), Expecting(), NeedNUMBER(), NextTok(), parseDouble(), and Unexpected().
|
inline |
Return a reference to current token in std::string form.
Definition at line 406 of file dsnlexer.h.
References curText.
Referenced by parseDouble().
|
inline |
Return a pointer to the current token's text.
Definition at line 398 of file dsnlexer.h.
References curText.
Referenced by CADSTAR_ARCHIVE_PARSER::LoadArchiveFile(), PCAD2KICAD::LoadInputFile(), parseDouble(), scanAtom(), and scanList().
|
inline |
Return whatever NextTok() returned the last time it was called.
Definition at line 237 of file dsnlexer.h.
References curTok.
Referenced by Scan(), and scanList().
void DSNLEXER::Duplicate | ( | int | aTok | ) |
Throw an IO_ERROR exception with a message saying specifically that aTok is a duplicate of one already seen in current context.
aTok | is the token/keyword type which was not expected at the current input location. |
IO_ERROR | with the location within the input file of the problem. |
Definition at line 350 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), GetTokenString(), and THROW_PARSE_ERROR.
void DSNLEXER::Expecting | ( | const char * | aTokenList | ) | const |
Throw an IO_ERROR exception with an input file specific error message.
aTokenList | is the token/keyword type which was expected at the current input location, e.g. "pin|graphic|property". |
IO_ERROR | with the location within the input file of the problem. |
Definition at line 334 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), text, and THROW_PARSE_ERROR.
void DSNLEXER::Expecting | ( | int | aTok | ) | const |
Throw an IO_ERROR exception with an input file specific error message.
aTok | is the token/keyword type which was expected at the current input location. |
IO_ERROR | with the location within the input file of the problem. |
Definition at line 326 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), GetTokenString(), and THROW_PARSE_ERROR.
Referenced by NeedLEFT(), NeedRIGHT(), NeedSYMBOL(), and NeedSYMBOLorNUMBER().
|
protected |
Take aToken string and looks up the string in the keywords table.
aToken | is a string to lookup in the keywords table. |
Definition at line 230 of file dsnlexer.cpp.
References DSN_SYMBOL, and keywordsLookup.
Referenced by GetCurStrAsToken(), and NextTok().
|
inline |
Return the current token text as a wxString, assuming that the input byte stream is UTF8 encoded.
Definition at line 415 of file dsnlexer.h.
References curText.
Referenced by ReadCommentLines().
|
inline |
Used to support "loose" matches (quoted tokens).
Definition at line 253 of file dsnlexer.h.
References curText, and findToken().
wxString DSNLEXER::GetTokenString | ( | int | aTok | ) | const |
Return a quote wrapped wxString representation of a token value.
Definition at line 307 of file dsnlexer.cpp.
References GetTokenText().
Referenced by Duplicate(), Expecting(), and Unexpected().
const char * DSNLEXER::GetTokenText | ( | int | aTok | ) | const |
Return the C string representation of a DSN_T value.
Definition at line 288 of file dsnlexer.cpp.
References keywordCount, keywords, KEYWORD::name, and Syntax().
Referenced by GetTokenString(), and parseDouble().
|
protected |
Definition at line 40 of file dsnlexer.cpp.
References commentsAreTokens, curOffset, curTok, DSN_NONE, prevTok, space_in_quoted_tokens, specctraMode, and stringDelimiter.
Referenced by DSNLEXER().
void DSNLEXER::InitParserState | ( | ) |
Reinit variables used during parsing, to ensure od states are not used in a new parsing must be called before parsing a new file after parsing an old file to avoid starting with some variables in a non initial state.
Definition at line 156 of file dsnlexer.cpp.
References commentsAreTokens, curOffset, curTok, DSN_NONE, and prevTok.
|
inlineprotected |
Definition at line 490 of file dsnlexer.h.
References space_in_quoted_tokens, and stringDelimiter.
Referenced by NextTok().
|
static |
Test a token to see if it is a symbol.
This means it cannot be a special delimiter character such as DSN_LEFT, DSN_RIGHT, #DSN_QUOTE, etc. It may however, coincidentally match a keyword and still be a symbol.
Definition at line 317 of file dsnlexer.cpp.
References DSN_STRING, and DSN_SYMBOL.
Referenced by NeedSYMBOL(), and NeedSYMBOLorNUMBER().
void DSNLEXER::NeedLEFT | ( | ) |
Call NextTok() and then verifies that the token read in is a DSN_LEFT.
Definition at line 366 of file dsnlexer.cpp.
References DSN_LEFT, Expecting(), and NextTok().
int DSNLEXER::NeedNUMBER | ( | const char * | aExpectation | ) |
Call NextTok() and then verifies that the token read is type DSN_NUMBER.
IO_ERROR | if the next token does not satisfy the above test. |
Definition at line 405 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), DSN_NUMBER, NextTok(), and THROW_PARSE_ERROR.
Referenced by parseDouble().
void DSNLEXER::NeedRIGHT | ( | ) |
Call NextTok() and then verifies that the token read in is a DSN_RIGHT.
Definition at line 374 of file dsnlexer.cpp.
References DSN_RIGHT, Expecting(), and NextTok().
int DSNLEXER::NeedSYMBOL | ( | ) |
Call NextTok() and then verifies that the token read in satisfies IsSymbol().
IO_ERROR | if the next token does not satisfy IsSymbol(). |
Definition at line 383 of file dsnlexer.cpp.
References DSN_SYMBOL, Expecting(), IsSymbol(), and NextTok().
int DSNLEXER::NeedSYMBOLorNUMBER | ( | ) |
Call NextTok() and then verifies that the token read in satisfies bool IsSymbol() or the next token is DSN_NUMBER.
IO_ERROR | if the next token does not satisfy the above test. |
Definition at line 394 of file dsnlexer.cpp.
References DSN_NUMBER, Expecting(), IsSymbol(), and NextTok().
int DSNLEXER::NextTok | ( | ) |
Return the next token found in the input file or DSN_EOF when reaching the end of file.
Users should wrap this function to return an enum to aid in grammar debugging while running under a debugger, but leave this lower level function returning an int (so the enum does not collide with another usage).
IO_ERROR | only if the LINE_READER throws it. |
Definition at line 519 of file dsnlexer.cpp.
References _, commentsAreTokens, CurLine(), CurLineNumber(), CurOffset(), curOffset, CurSource(), curText, curTok, DSN_COMMENT, DSN_DASH, DSN_EOF, DSN_LEFT, DSN_NUMBER, DSN_QUOTE_DEF, DSN_RIGHT, DSN_STRING, DSN_STRING_QUOTE, exit, findToken(), isNumber(), isSep(), isSpace(), isStringTerminator(), limit, next, prevTok, readLine(), specctraMode, start, stringDelimiter, and THROW_PARSE_ERROR.
Referenced by CADSTAR_ARCHIVE_PARSER::LoadArchiveFile(), PCAD2KICAD::LoadInputFile(), NeedLEFT(), NeedNUMBER(), NeedRIGHT(), NeedSYMBOL(), NeedSYMBOLorNUMBER(), ReadCommentLines(), Scan(), and scanList().
|
protected |
Parse the current token as an ASCII numeric string with possible leading whitespace into a double precision floating point number.
IO_ERROR | if an error occurs attempting to convert the current token. |
Definition at line 825 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), CurStr(), CurText(), res, THROW_IO_ERROR, and THROW_PARSE_ERROR.
Referenced by DRAWING_SHEET_PARSER::parseDouble(), PCB_PLOT_PARAMS_PARSER::parseDouble(), parseDouble(), and STROKE_PARAMS_PARSER::parseDouble().
|
inlineprotected |
Definition at line 510 of file dsnlexer.h.
References NeedNUMBER(), and parseDouble().
|
inlineprotected |
Definition at line 517 of file dsnlexer.h.
References GetTokenText(), and parseDouble().
LINE_READER * DSNLEXER::PopReader | ( | ) |
Delete the top most LINE_READER from an internal stack of LINE_READERs and in the case of FILE_LINE_READER this means the associated FILE is closed.
The most recently used former LINE_READER on the stack becomes the current LINE_READER and its previous position in its input stream and the its latest line number should pertain. PopReader always starts reading from a new line upon returning to the previous LINE_READER. A pop is only possible if there are at least 2 #LINE_READERs on the stack, since popping the last one is not supported.
Definition at line 201 of file dsnlexer.cpp.
References dummy, limit, LINE_READER::Line(), next, reader, readerStack, and start.
|
inline |
Return whatever NextTok() returned the 2nd to last time it was called.
Definition at line 245 of file dsnlexer.h.
References prevTok.
void DSNLEXER::PushReader | ( | LINE_READER * | aLineReader | ) |
Manage a stack of LINE_READERs in order to handle nested file inclusion.
This function pushes aLineReader onto the top of a stack of LINE_READERs and makes it the current LINE_READER with its own #GetSource(), line number and line text. A grammar must be designed such that the "include" token (whatever its various names), and any of its parameters are not followed by anything on that same line, because PopReader always starts reading from a new line upon returning to the original LINE_READER.
Definition at line 189 of file dsnlexer.cpp.
References limit, next, reader, readerStack, and start.
Referenced by DSNLEXER().
wxArrayString * DSNLEXER::ReadCommentLines | ( | ) |
Check the next sequence of tokens and reads them into a wxArrayString if they are comments.
Reading continues until a non-comment token is encountered, and such last read token remains as CurTok() and as CurText(). No push back or "un get" mechanism is used for this support. Upon return you simply avoid calling NextTok() for the next token, but rather CurTok().
Definition at line 802 of file dsnlexer.cpp.
References DSN_COMMENT, FromUTF8(), NextTok(), and SetCommentsAreTokens().
|
inlineprotected |
Definition at line 461 of file dsnlexer.h.
References LINE_READER::Length(), limit, LINE_READER::Line(), next, reader, LINE_READER::ReadLine(), and start.
Referenced by NextTok().
|
inline |
Change the handling of comments.
If set true, comments are returned as single line strings with a terminating newline. Otherwise they are consumed by the lexer and not returned.
Definition at line 296 of file dsnlexer.h.
References commentsAreTokens.
Referenced by ReadCommentLines().
|
inline |
Change the setting controlling whether a space in a quoted string isa terminator.
val | If true, means |
Definition at line 280 of file dsnlexer.h.
References space_in_quoted_tokens, and specctraMode.
void DSNLEXER::SetSpecctraMode | ( | bool | aMode | ) |
Change the behavior of this lexer into or out of "specctra mode".
If specctra mode, then: -#) stringDelimiter can be changed. -#) KiCad quoting protocol is not in effect. -#) space_in_quoted_tokens is functional else none of the above are true.
The default mode is non-specctra mode, meaning: -#) stringDelimiter cannot be changed. -#) KiCad quoting protocol is in effect. -#) space_in_quoted_tokens is not functional.
Definition at line 140 of file dsnlexer.cpp.
References space_in_quoted_tokens, specctraMode, and stringDelimiter.
|
inline |
Change the string delimiter from the default " to some other character and return the old value.
aStringDelimiter | The character in lowest 8 bits. |
Definition at line 265 of file dsnlexer.h.
References specctraMode, and stringDelimiter.
bool DSNLEXER::SyncLineReaderWith | ( | DSNLEXER & | aLexer | ) |
Usable only for DSN lexers which share the same LINE_READER.
Synchronizes the pointers handling the data read by the LINE_READER. Allows 2 #DNSLEXER objects to share the same current line, when switching from a #DNSLEXER to another #DNSLEXER
aLexer | the model. |
Definition at line 166 of file dsnlexer.cpp.
References curOffset, curText, limit, next, reader, and start.
|
static |
Definition at line 244 of file dsnlexer.cpp.
References DSN_DASH, DSN_EOF, DSN_LEFT, DSN_NONE, DSN_NUMBER, DSN_QUOTE_DEF, DSN_RIGHT, DSN_STRING, DSN_STRING_QUOTE, and DSN_SYMBOL.
Referenced by GetTokenText().
void DSNLEXER::Unexpected | ( | const char * | aToken | ) | const |
Throw an IO_ERROR exception with an input file specific error message.
aToken | is the token which was not expected at the current input location. |
IO_ERROR | with the location within the input file of the problem. |
Definition at line 358 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), text, and THROW_PARSE_ERROR.
void DSNLEXER::Unexpected | ( | int | aTok | ) | const |
Throw an IO_ERROR exception with an input file specific error message.
aTok | is the token/keyword type which was not expected at the current input location. |
IO_ERROR | with the location within the input file of the problem. |
Definition at line 342 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), GetTokenString(), and THROW_PARSE_ERROR.
Referenced by Scan(), and scanList().
|
protected |
true if should return comments as tokens
Definition at line 544 of file dsnlexer.h.
Referenced by init(), InitParserState(), NextTok(), and SetCommentsAreTokens().
|
protected |
offset within current line of the current token
Definition at line 547 of file dsnlexer.h.
Referenced by CurOffset(), init(), InitParserState(), NextTok(), and SyncLineReaderWith().
|
protected |
the text of the current token
Definition at line 550 of file dsnlexer.h.
Referenced by CurStr(), CurText(), FromUTF8(), GetCurStrAsToken(), NextTok(), and SyncLineReaderWith().
|
protected |
the current token obtained on last NextTok()
Definition at line 549 of file dsnlexer.h.
Referenced by CurTok(), init(), InitParserState(), and NextTok().
|
protected |
|
protected |
on readerStack, should I delete them?
Definition at line 522 of file dsnlexer.h.
Referenced by ~DSNLEXER().
|
protected |
|
protected |
table sorted by CMake for bsearch()
Definition at line 552 of file dsnlexer.h.
Referenced by GetTokenText().
|
protected |
fast, specialized "C string" hashtable
Definition at line 554 of file dsnlexer.h.
Referenced by findToken().
|
protected |
Definition at line 525 of file dsnlexer.h.
Referenced by NextTok(), PopReader(), PushReader(), readLine(), and SyncLineReaderWith().
|
protected |
Definition at line 524 of file dsnlexer.h.
Referenced by NextTok(), PopReader(), PushReader(), readLine(), and SyncLineReaderWith().
|
protected |
curTok from previous NextTok() call.
Definition at line 546 of file dsnlexer.h.
Referenced by init(), InitParserState(), NextTok(), and PrevTok().
|
protected |
Definition at line 533 of file dsnlexer.h.
Referenced by CurLineNumber(), CurSource(), PopReader(), PushReader(), readLine(), and SyncLineReaderWith().
|
protected |
all the LINE_READERs by pointer.
no ownership. ownership is via readerStack, maybe, if iOwnReaders
Definition at line 530 of file dsnlexer.h.
Referenced by PopReader(), PushReader(), and ~DSNLEXER().
|
protected |
blank spaces within quoted strings
Definition at line 542 of file dsnlexer.h.
Referenced by init(), isStringTerminator(), SetSpaceInQuotedTokens(), and SetSpecctraMode().
|
protected |
if true, then: 1) stringDelimiter can be changed 2) Kicad quoting protocol is not in effect 3) space_in_quoted_tokens is functional else not.
Definition at line 535 of file dsnlexer.h.
Referenced by init(), NextTok(), SetSpaceInQuotedTokens(), SetSpecctraMode(), and SetStringDelimiter().
|
protected |
Definition at line 523 of file dsnlexer.h.
Referenced by NextTok(), PopReader(), PushReader(), readLine(), and SyncLineReaderWith().
|
protected |
Definition at line 541 of file dsnlexer.h.
Referenced by init(), isStringTerminator(), NextTok(), SetSpecctraMode(), and SetStringDelimiter().