geany
1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
![]() ![]() |
#include "general.h"
#include <ctype.h>
#include <string.h>
#include "debug.h"
#include "entry.h"
#include "keyword.h"
#include "parse.h"
#include "read.h"
#include "routines.h"
#include "vstring.h"
Go to the source code of this file.
Classes | |
struct | sTokenInfo |
Macros | |
#define | isType(token, t) (bool) ((token)->type == (t)) |
#define | isKeyword(token, k) (bool) ((token)->keyword == (k)) |
#define | isIdentChar(c) (isalpha (c) || isdigit (c) || (c) == '_' || (c) == '-' || (c) == '+') |
Typedefs | |
typedef int | keywordId |
typedef int | tokenType |
typedef struct sTokenInfo | tokenInfo |
Functions | |
static tokenInfo * | newToken (void) |
static void | deleteToken (tokenInfo *const token) |
static void | makeBibTag (tokenInfo *const token, bibKind kind) |
static void | parseIdentifier (vString *const string, const int firstChar) |
static bool | readToken (tokenInfo *const token) |
static void | copyToken (tokenInfo *const dest, tokenInfo *const src) |
static bool | parseTag (tokenInfo *const token, bibKind kind) |
static void | parseBibFile (tokenInfo *const token) |
static void | initialize (const langType language) |
static void | findBibTags (void) |
parserDefinition * | BibtexParser (void) |
Variables | |
static langType | Lang_bib |
static kindDefinition | BibKinds [] |
static const keywordTable | BibKeywordTable [] |
#define isIdentChar | ( | c | ) | (isalpha (c) || isdigit (c) || (c) == '_' || (c) == '-' || (c) == '+') |
Definition at line 34 of file geany_bibtex.c.
#define isKeyword | ( | token, | |
k | |||
) | (bool) ((token)->keyword == (k)) |
Definition at line 33 of file geany_bibtex.c.
#define isType | ( | token, | |
t | |||
) | (bool) ((token)->type == (t)) |
Definition at line 32 of file geany_bibtex.c.
typedef int keywordId |
Definition at line 61 of file geany_bibtex.c.
typedef struct sTokenInfo tokenInfo |
typedef int tokenType |
Definition at line 71 of file geany_bibtex.c.
enum bibKind |
Definition at line 87 of file geany_bibtex.c.
enum eKeywordId |
Definition at line 44 of file geany_bibtex.c.
enum eTokenType |
Definition at line 63 of file geany_bibtex.c.
parserDefinition * BibtexParser | ( | void | ) |
Definition at line 415 of file geany_bibtex.c.
References ARRAY_SIZE, Assert, BibKeywordTable, BibKinds, BIBTAG_COUNT, sParserDefinition::extensions, findBibTags(), sParserDefinition::initialize, initialize(), sParserDefinition::keywordCount, sParserDefinition::keywordTable, sParserDefinition::kindCount, sParserDefinition::kindTable, NULL, sParserDefinition::parser, and parserNew().
Definition at line 264 of file geany_bibtex.c.
References tokenInfo::filePosition, tokenInfo::keyword, tokenInfo::lineNumber, tokenInfo::string, tokenInfo::type, and vStringCopy().
Referenced by parseTag().
|
static |
Definition at line 160 of file geany_bibtex.c.
References eFree(), tokenInfo::string, and vStringDelete().
Referenced by findBibTags(), and parseTag().
|
static |
Definition at line 405 of file geany_bibtex.c.
References deleteToken(), newToken(), and parseBibFile().
Referenced by BibtexParser().
|
static |
Definition at line 169 of file geany_bibtex.c.
References BibKinds, sTagEntryInfo::filePosition, tokenInfo::filePosition, initTagEntry(), sTagEntryInfo::lineNumber, tokenInfo::lineNumber, makeTagEntry(), name, tokenInfo::string, and vStringValue.
Referenced by parseTag().
|
static |
Definition at line 147 of file geany_bibtex.c.
References tokenInfo::filePosition, getInputFilePosition(), getInputLineNumber(), tokenInfo::keyword, KEYWORD_NONE, tokenInfo::lineNumber, tokenInfo::string, TOKEN_UNDEFINED, tokenInfo::type, vStringNew(), and xMalloc.
Referenced by findBibTags(), and parseTag().
|
static |
Definition at line 333 of file geany_bibtex.c.
References BIBTAG_ARTICLE, BIBTAG_BOOK, BIBTAG_BOOKLET, BIBTAG_CONFERENCE, BIBTAG_INBOOK, BIBTAG_INCOLLECTION, BIBTAG_INPROCEEDINGS, BIBTAG_MANUAL, BIBTAG_MASTERSTHESIS, BIBTAG_MISC, BIBTAG_PHDTHESIS, BIBTAG_PROCEEDINGS, BIBTAG_STRING, BIBTAG_TECHREPORT, BIBTAG_UNPUBLISHED, isType, tokenInfo::keyword, KEYWORD_article, KEYWORD_book, KEYWORD_booklet, KEYWORD_conference, KEYWORD_inbook, KEYWORD_incollection, KEYWORD_inproceedings, KEYWORD_manual, KEYWORD_mastersthesis, KEYWORD_misc, KEYWORD_phdthesis, KEYWORD_proceedings, KEYWORD_string, KEYWORD_techreport, KEYWORD_unpublished, parseTag(), readToken(), and TOKEN_KEYWORD.
Referenced by findBibTags().
|
static |
Definition at line 192 of file geany_bibtex.c.
References Assert, getcFromInputFile(), isIdentChar, ungetcToInputFile(), and vStringPut().
Referenced by readToken().
Definition at line 277 of file geany_bibtex.c.
References copyToken(), deleteToken(), isType, makeBibTag(), name, newToken(), readToken(), tokenInfo::string, TOKEN_IDENTIFIER, TOKEN_KEYWORD, TOKEN_OPEN_CURLY, vStringCat(), vStringCopy(), vStringDelete(), vStringLength, vStringNew(), and vStringStripTrailing().
Referenced by parseBibFile().
|
static |
Definition at line 205 of file geany_bibtex.c.
References tokenInfo::filePosition, getcFromInputFile(), getInputFilePosition(), getInputLineNumber(), isIdentChar, isKeyword, tokenInfo::keyword, KEYWORD_NONE, Lang_bib, tokenInfo::lineNumber, lookupCaseKeyword(), parseIdentifier(), skipToCharacterInInputFile(), tokenInfo::string, TOKEN_IDENTIFIER, TOKEN_KEYWORD, TOKEN_UNDEFINED, tokenInfo::type, ungetcToInputFile(), vStringClear, vStringPut(), and vStringValue.
Referenced by parseBibFile(), and parseTag().
|
static |
Definition at line 124 of file geany_bibtex.c.
Referenced by BibtexParser().
|
static |
Definition at line 106 of file geany_bibtex.c.
Referenced by BibtexParser(), and makeBibTag().
|
static |
Definition at line 85 of file geany_bibtex.c.
Referenced by initialize(), and readToken().