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. | |
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. | |
DSNLEXER (const std::string &aSExpression, const wxString &aSource=wxEmptyString) | |
Initialize a DSN lexer and prepares to read from aSExpression. | |
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. | |
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. | |
bool | SyncLineReaderWith (DSNLEXER &aLexer) |
Usable only for DSN lexers which share the same LINE_READER. | |
void | SetSpecctraMode (bool aMode) |
Change the behavior of this lexer into or out of "specctra mode". | |
void | PushReader (LINE_READER *aLineReader) |
Manage a stack of LINE_READERs in order to handle nested file inclusion. | |
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. | |
int | NextTok () |
Return the next token found in the input file or DSN_EOF when reaching the end of file. | |
int | NeedSYMBOL () |
Call NextTok() and then verifies that the token read in satisfies IsSymbol(). | |
int | NeedSYMBOLorNUMBER () |
Call NextTok() and then verifies that the token read in satisfies bool IsSymbol() or the next token is DSN_NUMBER. | |
int | NeedNUMBER (const char *aExpectation) |
Call NextTok() and then verifies that the token read is type DSN_NUMBER. | |
int | CurTok () const |
Return whatever NextTok() returned the last time it was called. | |
int | PrevTok () const |
Return whatever NextTok() returned the 2nd to last time it was called. | |
int | GetCurStrAsToken () const |
Used to support "loose" matches (quoted tokens). | |
char | SetStringDelimiter (char aStringDelimiter) |
Change the string delimiter from the default " to some other character and return the old value. | |
bool | SetSpaceInQuotedTokens (bool val) |
Change the setting controlling whether a space in a quoted string isa terminator. | |
void | SetKnowsBar (bool knowsBar=true) |
bool | SetCommentsAreTokens (bool val) |
Change the handling of comments. | |
wxArrayString * | ReadCommentLines () |
Check the next sequence of tokens and reads them into a wxArrayString if they are comments. | |
void | Expecting (int aTok) const |
Throw an IO_ERROR exception with an input file specific error message. | |
void | Expecting (const char *aTokenList) const |
Throw an IO_ERROR exception with an input file specific error message. | |
void | Unexpected (int aTok) const |
Throw an IO_ERROR exception with an input file specific error message. | |
void | Unexpected (const char *aToken) const |
Throw an IO_ERROR exception with an input file specific error message. | |
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. | |
void | NeedLEFT () |
Call NextTok() and then verifies that the token read in is a DSN_LEFT. | |
void | NeedRIGHT () |
Call NextTok() and then verifies that the token read in is a DSN_RIGHT. | |
void | NeedBAR () |
Call NextTok() and then verifies that the token read in is a DSN_BAR. | |
const char * | GetTokenText (int aTok) const |
Return the C string representation of a DSN_T value. | |
wxString | GetTokenString (int aTok) const |
Return a quote wrapped wxString representation of a token value. | |
const char * | CurText () const |
Return a pointer to the current token's text. | |
const std::string & | CurStr () const |
Return a reference to current token in std::string form. | |
const std::string & | CurSeparator () const |
wxString | FromUTF8 () const |
Return the current token text as a wxString, assuming that the input byte stream is UTF8 encoded. | |
int | CurLineNumber () const |
Return the current line number within my LINE_READER. | |
const char * | CurLine () const |
Return the current line of text from which the CurText() would return its token. | |
const wxString & | CurSource () const |
Return the current LINE_READER source. | |
int | CurOffset () const |
Return the byte offset within the current line, using a 1 based index. | |
Static Public Member Functions | |
static bool | IsSymbol (int aTok) |
Test a token to see if it is a symbol. | |
static bool | IsNumber (int aTok) |
static const char * | Syntax (int aTok) |
Protected Types | |
typedef std::vector< LINE_READER * > | READER_STACK |
Protected Member Functions | |
void | init () |
bool | isSep (char cc) |
int | readLine () |
int | findToken (const std::string &aToken) const |
Take aToken string and looks up the string in the keywords table. | |
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. | |
double | parseDouble (const char *aExpected) |
template<typename T > | |
double | parseDouble (T aToken) |
Protected Attributes | |
bool | iOwnReaders |
On readerStack, should I delete them? | |
const char * | start |
const char * | next |
const char * | limit |
char | dummy [1] |
When there is no reader. | |
READER_STACK | readerStack |
all the LINE_READERs by pointer. | |
LINE_READER * | reader |
No ownership. ownership is via readerStack, maybe, if iOwnReaders. | |
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. | |
bool | m_knowsBar |
True if the lexer knows about the bar token. | |
char | stringDelimiter |
bool | space_in_quoted_tokens |
Blank spaces within quoted strings. | |
bool | commentsAreTokens |
True if should return comments as tokens. | |
int | prevTok |
curTok from previous NextTok() call. | |
int | curOffset |
Offset within current line of the current token. | |
int | curTok |
The current token obtained on last NextTok(). | |
std::string | curText |
The text of the current token. | |
std::string | curSeparator |
The text of the separator preceeding the current text. | |
const KEYWORD * | keywords |
Table sorted by CMake for bsearch(). | |
unsigned | keywordCount |
Count of keywords table. | |
const KEYWORD_MAP * | keywordsLookup |
Fast, specialized "C string" hashtable. | |
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 80 of file dsnlexer.h.
|
protected |
Definition at line 555 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 54 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 74 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 119 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 95 of file dsnlexer.cpp.
References init(), and PushReader().
|
virtual |
Definition at line 139 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 455 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 447 of file dsnlexer.h.
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 475 of file dsnlexer.h.
Referenced by Duplicate(), Expecting(), NeedNUMBER(), NextTok(), parseDouble(), and Unexpected().
|
inline |
Definition at line 430 of file dsnlexer.h.
|
inline |
Return the current LINE_READER source.
Definition at line 465 of file dsnlexer.h.
Referenced by Duplicate(), Expecting(), NeedNUMBER(), NextTok(), parseDouble(), and Unexpected().
|
inline |
Return a reference to current token in std::string form.
Definition at line 425 of file dsnlexer.h.
Referenced by parseDouble().
|
inline |
Return a pointer to the current token's text.
Definition at line 417 of file dsnlexer.h.
Referenced by CADSTAR_ARCHIVE_PARSER::LoadArchiveFile(), PCAD2KICAD::LoadInputFile(), scanAtom(), and scanList().
|
inline |
Return whatever NextTok() returned the last time it was called.
Definition at line 238 of file dsnlexer.h.
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 363 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 349 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 342 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), GetTokenString(), and THROW_PARSE_ERROR.
Referenced by NeedBAR(), 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 241 of file dsnlexer.cpp.
References DSN_SYMBOL, and keywordsLookup.
Referenced by NextTok().
|
inline |
Return the current token text as a wxString, assuming that the input byte stream is UTF8 encoded.
Definition at line 439 of file dsnlexer.h.
Referenced by ReadCommentLines().
|
inline |
Used to support "loose" matches (quoted tokens).
Definition at line 254 of file dsnlexer.h.
wxString DSNLEXER::GetTokenString | ( | int | aTok | ) | const |
Return a quote wrapped wxString representation of a token value.
Definition at line 317 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 302 of file dsnlexer.cpp.
References keywordCount, keywords, KEYWORD::name, and Syntax().
Referenced by GetTokenString().
|
protected |
Definition at line 39 of file dsnlexer.cpp.
References commentsAreTokens, curOffset, curTok, DSN_NONE, prevTok, SetKnowsBar(), 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 167 of file dsnlexer.cpp.
References commentsAreTokens, curOffset, curTok, DSN_NONE, and prevTok.
|
static |
Definition at line 336 of file dsnlexer.cpp.
References DSN_NUMBER.
Referenced by NeedNUMBER(), and NeedSYMBOLorNUMBER().
|
inlineprotected |
Definition at line 475 of file dsnlexer.cpp.
References isSpace(), and m_knowsBar.
Referenced by NextTok().
|
inlineprotected |
Definition at line 516 of file dsnlexer.h.
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 327 of file dsnlexer.cpp.
References DSN_STRING, and DSN_SYMBOL.
Referenced by NeedSYMBOL(), and NeedSYMBOLorNUMBER().
void DSNLEXER::NeedBAR | ( | ) |
Call NextTok() and then verifies that the token read in is a DSN_BAR.
Definition at line 395 of file dsnlexer.cpp.
References DSN_BAR, Expecting(), and NextTok().
void DSNLEXER::NeedLEFT | ( | ) |
Call NextTok() and then verifies that the token read in is a DSN_LEFT.
Definition at line 377 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 426 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), IsNumber(), NextTok(), and THROW_PARSE_ERROR.
void DSNLEXER::NeedRIGHT | ( | ) |
Call NextTok() and then verifies that the token read in is a DSN_RIGHT.
Definition at line 386 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 404 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 415 of file dsnlexer.cpp.
References Expecting(), IsNumber(), 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 540 of file dsnlexer.cpp.
References _, commentsAreTokens, CurLine(), CurLineNumber(), CurOffset(), curOffset, curSeparator, CurSource(), curText, curTok, DSN_BAR, 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, m_knowsBar, next, prevTok, readLine(), specctraMode, start, stringDelimiter, and THROW_PARSE_ERROR.
Referenced by CADSTAR_ARCHIVE_PARSER::LoadArchiveFile(), PCAD2KICAD::LoadInputFile(), NeedBAR(), 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 861 of file dsnlexer.cpp.
References _, CurLine(), CurLineNumber(), CurOffset(), CurSource(), CurStr(), res, THROW_IO_ERROR, and THROW_PARSE_ERROR.
Referenced by DRAWING_SHEET_PARSER::parseDouble(), PCB_PLOT_PARAMS_PARSER::parseDouble(), and STROKE_PARAMS_PARSER::parseDouble().
|
inlineprotected |
Definition at line 536 of file dsnlexer.h.
References parseDouble().
Definition at line 543 of file dsnlexer.h.
References 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 212 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 246 of file dsnlexer.h.
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 200 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 838 of file dsnlexer.cpp.
References DSN_COMMENT, FromUTF8(), NextTok(), and SetCommentsAreTokens().
|
inlineprotected |
|
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 306 of file dsnlexer.h.
Referenced by ReadCommentLines().
|
inline |
Definition at line 291 of file dsnlexer.h.
Referenced by init().
|
inline |
Change the setting controlling whether a space in a quoted string isa terminator.
val | If true, means |
Definition at line 281 of file dsnlexer.h.
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 150 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 266 of file dsnlexer.h.
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 177 of file dsnlexer.cpp.
References curOffset, curText, limit, next, reader, and start.
|
static |
Definition at line 255 of file dsnlexer.cpp.
References DSN_BAR, 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 370 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 356 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 573 of file dsnlexer.h.
Referenced by init(), InitParserState(), and NextTok().
|
protected |
Offset within current line of the current token.
Definition at line 576 of file dsnlexer.h.
Referenced by init(), InitParserState(), NextTok(), and SyncLineReaderWith().
|
protected |
The text of the separator preceeding the current text.
Definition at line 580 of file dsnlexer.h.
Referenced by NextTok().
|
protected |
The text of the current token.
Definition at line 579 of file dsnlexer.h.
Referenced by NextTok(), and SyncLineReaderWith().
|
protected |
The current token obtained on last NextTok().
Definition at line 578 of file dsnlexer.h.
Referenced by init(), InitParserState(), and NextTok().
|
protected |
|
protected |
On readerStack, should I delete them?
Definition at line 549 of file dsnlexer.h.
Referenced by ~DSNLEXER().
|
protected |
|
protected |
Table sorted by CMake for bsearch().
Definition at line 582 of file dsnlexer.h.
Referenced by GetTokenText().
|
protected |
Fast, specialized "C string" hashtable.
Definition at line 584 of file dsnlexer.h.
Referenced by findToken().
|
protected |
Definition at line 552 of file dsnlexer.h.
Referenced by NextTok(), PopReader(), PushReader(), and SyncLineReaderWith().
|
protected |
True if the lexer knows about the bar token.
This was introduced by 77797103f7eb1483e03660d3b7848537ebe7cb1f
Definition at line 567 of file dsnlexer.h.
|
protected |
Definition at line 551 of file dsnlexer.h.
Referenced by NextTok(), PopReader(), PushReader(), and SyncLineReaderWith().
|
protected |
curTok from previous NextTok() call.
Definition at line 575 of file dsnlexer.h.
Referenced by init(), InitParserState(), and NextTok().
|
protected |
No ownership. ownership is via readerStack, maybe, if iOwnReaders.
Definition at line 560 of file dsnlexer.h.
Referenced by PopReader(), PushReader(), and SyncLineReaderWith().
|
protected |
all the LINE_READERs by pointer.
Definition at line 557 of file dsnlexer.h.
Referenced by PopReader(), PushReader(), and ~DSNLEXER().
|
protected |
Blank spaces within quoted strings.
Definition at line 571 of file dsnlexer.h.
Referenced by init(), 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 562 of file dsnlexer.h.
Referenced by init(), NextTok(), and SetSpecctraMode().
|
protected |
Definition at line 550 of file dsnlexer.h.
Referenced by NextTok(), PopReader(), PushReader(), and SyncLineReaderWith().
|
protected |
Definition at line 570 of file dsnlexer.h.
Referenced by init(), NextTok(), and SetSpecctraMode().