FreeBASIC  0.91.0
lex.bi File Reference
#include "dstr.bi"
Include dependency graph for lex.bi:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  FBTOKEN
 
class  LEX_TKCTX
 
class  LEX_CTX
 

Macros

#define lexLineNum()   /* lex.ctx->linenum */
 
#define lexGetLastToken()   /* lex.ctx->lasttk_id */
 
#define lexGetTextW()   /* @lex.ctx->head->textw */
 
#define lexGetTextLen()   /* lex.ctx->head->len */
 
#define lexGetType()   /* lex.ctx->head->dtype */
 
#define lexGetSymChain()   /* lex.ctx->head->sym_chain */
 
#define lexGetPeriodPos()   /* lex.ctx->head->prdpos */
 
#define lexGetHasSlash()   /* lex.ctx->head->hasesc */
 
#define lexGetHead()   /* lex.ctx->head */
 
#define lexCurrLineGet()   /* lex.ctx->currline.data */
 
#define lexCurrLineReset()   /* DZstrReset( lex.ctx->currline ) */
 

Enumerations

enum  LEXCHECK {
  LEXCHECK_EVERYTHING = &h0000, LEXCHECK_NOLINECONT = &h0001, LEXCHECK_NODEFINE = &h0002, LEXCHECK_NOWHITESPC = &h0004,
  LEXCHECK_NOSUFFIX = &h0008, LEXCHECK_NOQUOTES = &h0010, LEXCHECK_NOSYMBOL = &h0020, LEXCHECK_NOPERIOD = &h0040,
  LEXCHECK_EATPERIOD = &h0080, LEXCHECK_KWDNAMESPC = &h0100, LEXCHECK_NOMULTILINECOMMENT = &h0200, LEXCHECK_NOLETTERSUFFIX = &h0400
}
 

Functions

sub lexInit (byval_as_integer isinclude)
 
sub lexEnd ()
 
sub lexPushCtx ()
 
sub lexPopCtx ()
 
function_as_integer lexGetToken (byval_as_LEXCHECK flags=LEXCHECK_EVERYTHING)
 
function_as_integer lexGetClass (byval_as_LEXCHECK flags=LEXCHECK_EVERYTHING)
 
function_as_zstring_ptr lexGetText ()
 
sub lexEatToken (byval_as_zstring_ptr token, byval_as_LEXCHECK flags=LEXCHECK_EVERYTHING)
 
sub lexPPOnlyEmitToken ()
 
sub lexPPOnlyEmitText (byref_as_string s)
 
sub lexSkipToken (byval_as_LEXCHECK flags=LEXCHECK_EVERYTHING)
 
function_as_integer lexGetLookAheadClass (byval_as_integer k, byval_as_LEXCHECK flags=LEXCHECK_EVERYTHING)
 
function_as_integer lexGetLookAhead (byval_as_integer k, byval_as_LEXCHECK flags=LEXCHECK_EVERYTHING)
 
sub lexReadLine (byval_as_uinteger endchar=INVALID, byval_as_zstring_ptr dst=INVALID, byval_as_integer skipline=FALSE)
 
sub lexSkipLine ()
 
sub lexNextToken (byval_as_FBTOKEN_ptr t, byval_as_LEXCHECK flags=LEXCHECK_EVERYTHING)
 
function_as_uinteger lexCurrentChar (byval_as_integer skipwhitespc=FALSE)
 
function_as_uinteger lexGetLookAheadChar (byval_as_integer skipwhitespc=FALSE)
 
function_as_uinteger lexEatChar ()
 
function_as_string lexPeekCurrentLine (byref_as_string token_pos, byval_as_integer do_trim)
 

Variables

const VAR FB_LEX_MAXK = 3
 
const VAR LEX_MAXBUFFCHARS = 8192
 
LEX_CTX lex
 

Macro Definition Documentation

#define lexCurrLineGet ( )    /* lex.ctx->currline.data */

Definition at line 250 of file lex.bi.

#define lexCurrLineReset ( )    /* DZstrReset( lex.ctx->currline ) */

Definition at line 252 of file lex.bi.

#define lexGetHasSlash ( )    /* lex.ctx->head->hasesc */

Definition at line 246 of file lex.bi.

#define lexGetHead ( )    /* lex.ctx->head */

Definition at line 248 of file lex.bi.

#define lexGetLastToken ( )    /* lex.ctx->lasttk_id */

Definition at line 234 of file lex.bi.

#define lexGetPeriodPos ( )    /* lex.ctx->head->prdpos */

Definition at line 244 of file lex.bi.

#define lexGetSymChain ( )    /* lex.ctx->head->sym_chain */

Definition at line 242 of file lex.bi.

#define lexGetTextLen ( )    /* lex.ctx->head->len */

Definition at line 238 of file lex.bi.

#define lexGetTextW ( )    /* @lex.ctx->head->textw */

Definition at line 236 of file lex.bi.

#define lexGetType ( )    /* lex.ctx->head->dtype */

Definition at line 240 of file lex.bi.

#define lexLineNum ( )    /* lex.ctx->linenum */

Definition at line 232 of file lex.bi.

Enumeration Type Documentation

enum LEXCHECK
Enumerator
LEXCHECK_EVERYTHING 
LEXCHECK_NOLINECONT 
LEXCHECK_NODEFINE 
LEXCHECK_NOWHITESPC 
LEXCHECK_NOSUFFIX 
LEXCHECK_NOQUOTES 
LEXCHECK_NOSYMBOL 
LEXCHECK_NOPERIOD 
LEXCHECK_EATPERIOD 
LEXCHECK_KWDNAMESPC 
LEXCHECK_NOMULTILINECOMMENT 
LEXCHECK_NOLETTERSUFFIX 

Definition at line 7 of file lex.bi.

Function Documentation

function_as_uinteger lexCurrentChar ( byval_as_integer  skipwhitespc = FALSE)

Definition at line 340 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_uinteger lexEatChar ( )

Definition at line 269 of file lex.bas.

Here is the caller graph for this function:

sub lexEatToken ( byval_as_zstring_ptr  token,
byval_as_LEXCHECK  flags = LEXCHECK_EVERYTHING 
)

Definition at line 2239 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub lexEnd ( )

Definition at line 139 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_integer lexGetClass ( byval_as_LEXCHECK  flags = LEXCHECK_EVERYTHING)

Definition at line 2033 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_integer lexGetLookAhead ( byval_as_integer  k,
byval_as_LEXCHECK  flags = LEXCHECK_EVERYTHING 
)

Definition at line 2048 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_uinteger lexGetLookAheadChar ( byval_as_integer  skipwhitespc = FALSE)

Definition at line 362 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_integer lexGetLookAheadClass ( byval_as_integer  k,
byval_as_LEXCHECK  flags = LEXCHECK_EVERYTHING 
)

Definition at line 2072 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_zstring_ptr lexGetText ( )

Definition at line 2257 of file lex.bas.

function_as_integer lexGetToken ( byval_as_LEXCHECK  flags = LEXCHECK_EVERYTHING)

Definition at line 2018 of file lex.bas.

Here is the call graph for this function:

sub lexInit ( byval_as_integer  isinclude)

Definition at line 68 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub lexNextToken ( byval_as_FBTOKEN_ptr  t,
byval_as_LEXCHECK  flags = LEXCHECK_EVERYTHING 
)

Definition at line 1549 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_string lexPeekCurrentLine ( byref_as_string  token_pos,
byval_as_integer  do_trim 
)

Definition at line 2358 of file lex.bas.

Here is the caller graph for this function:

sub lexPopCtx ( )

Definition at line 48 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub lexPPOnlyEmitText ( byref_as_string  s)

Definition at line 2199 of file lex.bas.

Here is the caller graph for this function:

sub lexPPOnlyEmitToken ( )

Definition at line 2163 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub lexPushCtx ( )

Definition at line 41 of file lex.bas.

Here is the caller graph for this function:

sub lexReadLine ( byval_as_uinteger  endchar = INVALID,
byval_as_zstring_ptr  dst = INVALID,
byval_as_integer  skipline = FALSE 
)

Definition at line 2273 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub lexSkipLine ( )

Definition at line 2350 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub lexSkipToken ( byval_as_LEXCHECK  flags = LEXCHECK_EVERYTHING)

Definition at line 2203 of file lex.bas.

Here is the call graph for this function:

Variable Documentation

const VAR FB_LEX_MAXK = 3

Definition at line 70 of file lex.bi.

LEX_CTX lex

Definition at line 28 of file lex.bas.

const VAR LEX_MAXBUFFCHARS = 8192

Definition at line 72 of file lex.bi.