#include <assert.h>#include <string.h>#include <string>#include <unicode/uchar.h>#include <libsherpa/utf8.hxx>#include <libsherpa/LexLoc.hxx>#include "BUILD/TransitionParser.hxx"#include "TransitionLexer.hxx"#include "LitValue.hxx"Go to the source code of this file.
Data Structures | |
| struct | TransitionLexer |
| Hand-crafted transitional syntax lexer. More... | |
Defines | |
| #define | RETURN_TOKEN(tok) |
Functions | |
| const char * | TransitionTokenName (int lexTokenNumber) |
| static int | kwstrcmp (const void *vKey, const void *vCandidate) |
| static bool | isWhiteSpace (ucs4_t c) |
| static bool | isCharDelimiter (ucs4_t c) |
Variables | |
| static bool | keywords_sorted = false |
| Whether keyword table has been sorted. | |
| #define RETURN_TOKEN | ( | tok | ) |
Value:
do { \ LToken _tok = tok; \ _tok.prevTokType = lastTokType; \ if (atBeginningOfLine) { \ _tok.flags |= TF_FIRST_ON_LINE; \ atBeginningOfLine = false; \ } \ return _tok; \ } while(false)
Definition at line 1073 of file TransitionLexer.cxx.
| static bool isCharDelimiter | ( | ucs4_t | c | ) | [static] |
| static bool isWhiteSpace | ( | ucs4_t | c | ) | [static] |
| static int kwstrcmp | ( | const void * | vKey, | |
| const void * | vCandidate | |||
| ) | [static] |
Definition at line 303 of file TransitionLexer.cxx.
Referenced by TransitionLexer::TransitionLexer().
| const char* TransitionTokenName | ( | int | lexTokenNumber | ) |
bool keywords_sorted = false [static] |
Whether keyword table has been sorted.
I added this because the emacs sort-lines function doesn't do the right thing for trailing punctuation in keywords. This is true because '!' sorts lower than '"', so
"set" sorts lower than "set!
I finally got tired of forgetting to fix this by hand.
Definition at line 176 of file TransitionLexer.cxx.
1.4.7