FreeBASIC  0.91.0
lex.bas File Reference
#include "fb.bi"
#include "fbint.bi"
#include "lex.bi"
#include "pp.bi"
#include "parser.bi"
Include dependency graph for lex.bas:

Go to the source code of this file.

Macros

#define UPDATE_LINENUM()
 

Functions

sub lexReadUTF8 ()
 
sub lexReadUTF16LE ()
 
sub lexReadUTF16BE ()
 
sub lexReadUTF32LE ()
 
sub lexReadUTF32BE ()
 
sub hMultiLineComment ()
 
sub lexPushCtx ()
 
sub lexPopCtx ()
 
sub lexInit (byval_as_integer isinclude)
 
sub lexEnd ()
 
private sub hCollectCharForDebugOutput (byval_as_uinteger char)
 
private function_as_uinteger hReadChar ()
 
function_as_uinteger lexEatChar ()
 
private sub hSkipChar (void)
 
function_as_uinteger lexCurrentChar (byval_as_integer skipwhitespc=FALSE)
 
function_as_uinteger lexGetLookAheadChar (byval_as_integer skipwhitespc=FALSE)
 
private sub hReadIdentifier (byval_as_zstring_ptr pid, byref_as_integer tlen, byref_as_integer dtype, byval_as_LEXCHECK flags)
 
private function_as_ulongint hReadNonDecNumber (byref_as_zstring_ptr pnum, byref_as_integer tlen, byref_as_integer dtype, byval_as_LEXCHECK flags)
 
private sub hReadFloatNumber (byref_as_zstring_ptr pnum, byref_as_integer tlen, byref_as_integer dtype, byval_as_integer hasdot, byval_as_LEXCHECK flags)
 
private sub hReadNumber (byval_as_zstring_ptr pnum, byref_as_integer dtype, byref_as_integer tlen, byval_as_LEXCHECK flags)
 
private sub hReadString (byval_as_FBTOKEN_ptr tk, byval_as_zstring_ptr ps, byval_as_LEXCHECK flags)
 
private sub hReadWStr (byval_as_FBTOKEN_ptr tk, byval_as_wstring_ptr ps, byval_as_LEXCHECK flags)
 
private sub hCheckPeriods (byval_as_FBTOKEN_ptr t, byval_as_LEXCHECK flags, byval_as_FBSYMCHAIN_ptr chain_)
 
sub lexNextToken (byval_as_FBTOKEN_ptr t, byval_as_LEXCHECK flags)
 
function_as_integer lexGetToken (byval_as_LEXCHECK flags)
 
function_as_integer lexGetClass (byval_as_LEXCHECK flags)
 
function_as_integer lexGetLookAhead (byval_as_integer k, byval_as_LEXCHECK flags)
 
function_as_integer lexGetLookAheadClass (byval_as_integer k, byval_as_LEXCHECK flags)
 
private sub hMoveKDown ()
 
private function_as_string lexGetStrLitText (byval_as_integer tk)
 
sub lexPPOnlyEmitToken ()
 
sub lexPPOnlyEmitText (byref_as_string s)
 
sub lexSkipToken (byval_as_LEXCHECK flags)
 
sub lexEatToken (byval_as_zstring_ptr token, byval_as_LEXCHECK flags)
 
function_as_zstring_ptr lexGetText ()
 
sub lexReadLine (byval_as_uinteger endchar=INVALID, byval_as_zstring_ptr dst=INVALID, byval_as_integer skipline=FALSE)
 
sub lexSkipLine ()
 
function_as_string lexPeekCurrentLine (byref_as_string token_pos, byval_as_integer do_trim)
 

Variables

const uinteger UINVALID = cuint( INVALID )
 
LEX_CTX lex
 
string pponly_ln
 

Macro Definition Documentation

#define UPDATE_LINENUM ( )
Value:
/* _
if( lex.ctx->deflen = 0 ) then :_
lex.ctx->linenum += 1 :_
end if */

Definition at line 35 of file lex.bas.

Function Documentation

private sub hCheckPeriods ( byval_as_FBTOKEN_ptr  t,
byval_as_LEXCHECK  flags,
byval_as_FBSYMCHAIN_ptr  chain_ 
)

Definition at line 1492 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hCollectCharForDebugOutput ( byval_as_uinteger  char)

Definition at line 147 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hMoveKDown ( )

Definition at line 2095 of file lex.bas.

Here is the caller graph for this function:

private sub hMultiLineComment ( )

Definition at line 1951 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_uinteger hReadChar ( )

Definition at line 176 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hReadFloatNumber ( byref_as_zstring_ptr  pnum,
byref_as_integer  tlen,
byref_as_integer  dtype,
byval_as_integer  hasdot,
byval_as_LEXCHECK  flags 
)

Definition at line 758 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hReadIdentifier ( byval_as_zstring_ptr  pid,
byref_as_integer  tlen,
byref_as_integer  dtype,
byval_as_LEXCHECK  flags 
)

Definition at line 406 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_ulongint hReadNonDecNumber ( byref_as_zstring_ptr  pnum,
byref_as_integer  tlen,
byref_as_integer  dtype,
byval_as_LEXCHECK  flags 
)

Definition at line 510 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hReadNumber ( byval_as_zstring_ptr  pnum,
byref_as_integer  dtype,
byref_as_integer  tlen,
byval_as_LEXCHECK  flags 
)

Definition at line 928 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hReadString ( byval_as_FBTOKEN_ptr  tk,
byval_as_zstring_ptr  ps,
byval_as_LEXCHECK  flags 
)

Definition at line 1244 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hReadWStr ( byval_as_FBTOKEN_ptr  tk,
byval_as_wstring_ptr  ps,
byval_as_LEXCHECK  flags 
)

Definition at line 1369 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private sub hSkipChar ( void  )

Definition at line 312 of file lex.bas.

Here is the caller graph for this function:

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 
)

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)

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 
)

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 
)

Definition at line 2072 of file lex.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_string lexGetStrLitText ( byval_as_integer  tk)

Definition at line 2104 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)

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 
)

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 lexReadUTF16BE ( )

Definition at line 506 of file lex-utf.bas.

sub lexReadUTF16LE ( )

Definition at line 371 of file lex-utf.bas.

sub lexReadUTF32BE ( )

Definition at line 754 of file lex-utf.bas.

sub lexReadUTF32LE ( )

Definition at line 630 of file lex-utf.bas.

sub lexReadUTF8 ( )

Definition at line 235 of file lex-utf.bas.

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)

Definition at line 2203 of file lex.bas.

Here is the call graph for this function:

Variable Documentation

LEX_CTX lex

Definition at line 28 of file lex.bas.

string pponly_ln

Definition at line 31 of file lex.bas.

const uinteger UINVALID = cuint( INVALID )

Definition at line 26 of file lex.bas.