ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
ugbc.yy.c File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "ugbc.tab.h"
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  yy_buffer_state
struct  yy_trans_info

Macros

#define YY_INT_ALIGNED   short int
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION   2
#define YY_FLEX_MINOR_VERSION   6
#define YY_FLEX_SUBMINOR_VERSION   4
#define FLEX_BETA
#define FLEXINT_H
#define INT8_MIN   (-128)
#define INT16_MIN   (-32767-1)
#define INT32_MIN   (-2147483647-1)
#define INT8_MAX   (127)
#define INT16_MAX   (32767)
#define INT32_MAX   (2147483647)
#define UINT8_MAX   (255U)
#define UINT16_MAX   (65535U)
#define UINT32_MAX   (4294967295U)
#define SIZE_MAX   (~(size_t)0)
#define yyconst   const
#define yynoreturn
#define YY_NULL   0
#define YY_SC_TO_UI(c)
#define BEGIN   (yy_start) = 1 + 2 *
#define YY_START   (((yy_start) - 1) / 2)
#define YYSTATE   YY_START
#define YY_STATE_EOF(state)
#define YY_NEW_FILE   yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR   0
#define YY_BUF_SIZE   16384
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#define YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_SIZE_T
#define EOB_ACT_CONTINUE_SCAN   0
#define EOB_ACT_END_OF_FILE   1
#define EOB_ACT_LAST_MATCH   2
#define YY_LESS_LINENO(n)
#define YY_LINENO_REWIND_TO(dst)
#define yyless(n)
#define unput(c)
#define YY_STRUCT_YY_BUFFER_STATE
#define YY_BUFFER_NEW   0
#define YY_BUFFER_NORMAL   1
#define YY_BUFFER_EOF_PENDING   2
#define YY_CURRENT_BUFFER
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER )
#define yy_new_buffer   yy_create_buffer
#define yy_set_interactive(is_interactive)
#define yy_set_bol(at_bol)
#define YY_AT_BOL()
#define yytext_ptr   yytext
#define YY_DO_BEFORE_ACTION
#define YY_NUM_RULES   1594
#define YY_END_OF_BUFFER   1595
#define REJECT   reject_used_but_not_detected
#define yymore()
#define YY_MORE_ADJ   0
#define YY_RESTORE_YY_MORE_OFFSET
#define RETURN(b, c)
#define INITIAL   0
#define incl   1
#define impt   2
#define asm   3
#define YY_EXTRA_TYPE   void *
#define YY_READ_BUF_SIZE   8192
#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#define YY_INPUT(buf, result, max_size)
#define yyterminate()
#define YY_START_STACK_INCR   25
#define YY_FATAL_ERROR(msg)
#define YY_DECL_IS_OURS   1
#define YY_DECL   int yylex (void)
#define YY_USER_ACTION
#define YY_BREAK   /*LINTED*/break;
#define YY_RULE_SETUP   YY_USER_ACTION
#define YY_EXIT_FAILURE   2
#define yyless(n)
#define YYTABLES_NAME   "yytables"

Typedefs

typedef struct yy_buffer_stateYY_BUFFER_STATE

Functions

void yyrestart (FILE *input_file)
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer)
YY_BUFFER_STATE yy_create_buffer (FILE *file, int size)
void yy_delete_buffer (YY_BUFFER_STATE b)
void yy_flush_buffer (YY_BUFFER_STATE b)
void yypush_buffer_state (YY_BUFFER_STATE new_buffer)
void yypop_buffer_state (void)
YY_BUFFER_STATE yy_scan_buffer (char *base, yy_size_t size)
YY_BUFFER_STATE yy_scan_string (const char *yy_str)
YY_BUFFER_STATE yy_scan_bytes (const char *bytes, int len)
void * yyalloc (yy_size_t)
void * yyrealloc (void *, yy_size_t)
void yyfree (void *)
char * import_file_name (char *_import_path)
char * strcopy (char *_dest, char *_source)
char * strreplace (const char *_orig, const char *_rep, const char *_with)
int yylex_destroy (void)
int yyget_debug (void)
void yyset_debug (int debug_flag)
YY_EXTRA_TYPE yyget_extra (void)
void yyset_extra (YY_EXTRA_TYPE user_defined)
FILE * yyget_in (void)
void yyset_in (FILE *_in_str)
FILE * yyget_out (void)
void yyset_out (FILE *_out_str)
int yyget_leng (void)
char * yyget_text (void)
int yyget_lineno (void)
void yyset_lineno (int _line_number)
int yywrap (void)
int yylex (void)
 if (!(yy_init))

Variables

int yyleng
FILE * yyin = NULL
FILE * yyout = NULL
int yylineno = 1
char * yytext
int yy_flex_debug = 0
int yyconcatlineno
int yycolno
int yyposno
char * filenamestacked [256]
int yylinenostacked []
int yycolnostacked []
int yyposnostacked []
int stacked
char * asmSnippet
char * importPath
char targetName []
 YY_DECL
char * yy_cp
char * yy_bp
int yy_act

Macro Definition Documentation

◆ asm

#define asm   3

Definition at line 2861 of file ugbc.yy.c.

◆ BEGIN

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 118 of file ugbc.yy.c.

◆ ECHO

#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)

Definition at line 2956 of file ugbc.yy.c.

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 162 of file ugbc.yy.c.

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

Definition at line 163 of file ugbc.yy.c.

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

Definition at line 164 of file ugbc.yy.c.

◆ FLEX_BETA

#define FLEX_BETA

Definition at line 14 of file ugbc.yy.c.

◆ FLEX_SCANNER

#define FLEX_SCANNER

Definition at line 9 of file ugbc.yy.c.

◆ FLEXINT_H

#define FLEXINT_H

Definition at line 30 of file ugbc.yy.c.

◆ impt

#define impt   2

Definition at line 2860 of file ugbc.yy.c.

◆ incl

#define incl   1

Definition at line 2859 of file ugbc.yy.c.

◆ INITIAL

#define INITIAL   0

Definition at line 2858 of file ugbc.yy.c.

◆ INT16_MAX

#define INT16_MAX   (32767)

Definition at line 72 of file ugbc.yy.c.

◆ INT16_MIN

#define INT16_MIN   (-32767-1)

Definition at line 63 of file ugbc.yy.c.

◆ INT32_MAX

#define INT32_MAX   (2147483647)

Definition at line 75 of file ugbc.yy.c.

◆ INT32_MIN

#define INT32_MIN   (-2147483647-1)

Definition at line 66 of file ugbc.yy.c.

◆ INT8_MAX

#define INT8_MAX   (127)

Definition at line 69 of file ugbc.yy.c.

◆ INT8_MIN

#define INT8_MIN   (-128)

Definition at line 60 of file ugbc.yy.c.

◆ REJECT

#define REJECT   reject_used_but_not_detected

Definition at line 2763 of file ugbc.yy.c.

◆ RETURN

#define RETURN ( b,
c )
Value:
{\
yycolno = (yycolno + yyleng) * c; \
return b; \
}
#define yyleng
int yycolno
Definition ugbc.tab.c:133
int yyposno
Definition ugbc.tab.c:138

Definition at line 2808 of file ugbc.yy.c.

◆ SIZE_MAX

#define SIZE_MAX   (~(size_t)0)

Definition at line 88 of file ugbc.yy.c.

◆ UINT16_MAX

#define UINT16_MAX   (65535U)

Definition at line 81 of file ugbc.yy.c.

◆ UINT32_MAX

#define UINT32_MAX   (4294967295U)

Definition at line 84 of file ugbc.yy.c.

◆ UINT8_MAX

#define UINT8_MAX   (255U)

Definition at line 78 of file ugbc.yy.c.

◆ unput

#define unput ( c)
Value:
yyunput( c, (yytext_ptr) )
#define yytext_ptr

Definition at line 201 of file ugbc.yy.c.

◆ YY_AT_BOL

#define YY_AT_BOL ( )
Value:
#define YY_CURRENT_BUFFER_LVALUE

Definition at line 342 of file ugbc.yy.c.

◆ YY_BREAK

#define YY_BREAK   /*LINTED*/break;

Definition at line 3035 of file ugbc.yy.c.

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

Definition at line 140 of file ugbc.yy.c.

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

Definition at line 263 of file ugbc.yy.c.

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

Definition at line 251 of file ugbc.yy.c.

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

Definition at line 252 of file ugbc.yy.c.

◆ YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER
Value:
( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)

Definition at line 279 of file ugbc.yy.c.

◆ YY_CURRENT_BUFFER_LVALUE

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 285 of file ugbc.yy.c.

◆ YY_DECL

#define YY_DECL   int yylex (void)

Definition at line 3023 of file ugbc.yy.c.

◆ YY_DECL_IS_OURS

#define YY_DECL_IS_OURS   1

Definition at line 3019 of file ugbc.yy.c.

◆ YY_DO_BEFORE_ACTION

#define YY_DO_BEFORE_ACTION
Value:
yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
char * yy_cp
char * yy_bp

Definition at line 368 of file ugbc.yy.c.

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   1595

Definition at line 375 of file ugbc.yy.c.

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 129 of file ugbc.yy.c.

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   void *

Definition at line 2872 of file ugbc.yy.c.

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR ( msg)
Value:
yy_fatal_error( msg )

Definition at line 3010 of file ugbc.yy.c.

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 10 of file ugbc.yy.c.

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   6

Definition at line 11 of file ugbc.yy.c.

◆ YY_FLEX_SUBMINOR_VERSION

#define YY_FLEX_SUBMINOR_VERSION   4

Definition at line 12 of file ugbc.yy.c.

◆ YY_FLUSH_BUFFER

#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER )

Definition at line 313 of file ugbc.yy.c.

◆ YY_INPUT

#define YY_INPUT ( buf,
result,
max_size )
Value:
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(yyin); \
} \
}\
\
#define yyin
size_t yy_size_t

Definition at line 2963 of file ugbc.yy.c.

◆ YY_INT_ALIGNED

#define YY_INT_ALIGNED   short int

Definition at line 5 of file ugbc.yy.c.

◆ YY_LESS_LINENO

#define YY_LESS_LINENO ( n)
Value:
do { \
int yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
}while(0)
#define yytext
#define yylineno

Definition at line 173 of file ugbc.yy.c.

◆ YY_LINENO_REWIND_TO

#define YY_LINENO_REWIND_TO ( dst)
Value:
do {\
const char *p;\
for ( p = yy_cp-1; p >= (dst); --p)\
if ( *p == '\n' )\
}while(0)

Definition at line 180 of file ugbc.yy.c.

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   0

Definition at line 2765 of file ugbc.yy.c.

◆ yy_new_buffer

#define yy_new_buffer   yy_create_buffer

Definition at line 323 of file ugbc.yy.c.

◆ YY_NEW_FILE

#define YY_NEW_FILE   yyrestart( yyin )

Definition at line 128 of file ugbc.yy.c.

◆ YY_NULL

#define YY_NULL   0

Definition at line 107 of file ugbc.yy.c.

◆ YY_NUM_RULES

#define YY_NUM_RULES   1594

Definition at line 374 of file ugbc.yy.c.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 2947 of file ugbc.yy.c.

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 2766 of file ugbc.yy.c.

◆ YY_RULE_SETUP

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 3038 of file ugbc.yy.c.

◆ YY_SC_TO_UI

#define YY_SC_TO_UI ( c)
Value:
((YY_CHAR) (c))
flex_uint8_t YY_CHAR

Definition at line 112 of file ugbc.yy.c.

◆ yy_set_bol

#define yy_set_bol ( at_bol)
Value:
{ \
yyensure_buffer_stack (); \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_CURRENT_BUFFER
#define YY_BUF_SIZE

Definition at line 333 of file ugbc.yy.c.

◆ yy_set_interactive

#define yy_set_interactive ( is_interactive)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (); \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}

Definition at line 324 of file ugbc.yy.c.

◆ YY_START

#define YY_START   (((yy_start) - 1) / 2)

Definition at line 123 of file ugbc.yy.c.

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

Definition at line 3005 of file ugbc.yy.c.

◆ YY_STATE_BUF_SIZE

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

Definition at line 146 of file ugbc.yy.c.

◆ YY_STATE_EOF

#define YY_STATE_EOF ( state)
Value:
(YY_END_OF_BUFFER + state + 1)
#define YY_END_OF_BUFFER

Definition at line 126 of file ugbc.yy.c.

◆ YY_STRUCT_YY_BUFFER_STATE

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 204 of file ugbc.yy.c.

◆ YY_TYPEDEF_YY_BUFFER_STATE

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 149 of file ugbc.yy.c.

◆ YY_TYPEDEF_YY_SIZE_T

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 154 of file ugbc.yy.c.

◆ YY_USER_ACTION

#define YY_USER_ACTION

Definition at line 3030 of file ugbc.yy.c.

◆ yyconst

#define yyconst   const

Definition at line 98 of file ugbc.yy.c.

◆ yyless [1/2]

#define yyless ( n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = (yy_hold_char); \
(yy_c_buf_p) = yytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
yyleng = yyless_macro_arg; \
} \
while ( 0 )

Definition at line 189 of file ugbc.yy.c.

◆ yyless [2/2]

#define yyless ( n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define YY_RESTORE_YY_MORE_OFFSET
#define YY_MORE_ADJ
#define YY_DO_BEFORE_ACTION

Definition at line 189 of file ugbc.yy.c.

◆ yymore

#define yymore ( )
Value:
yymore_used_but_not_detected

Definition at line 2764 of file ugbc.yy.c.

◆ yynoreturn

#define yynoreturn

Definition at line 103 of file ugbc.yy.c.

◆ YYSTATE

#define YYSTATE   YY_START

Definition at line 124 of file ugbc.yy.c.

◆ YYTABLES_NAME

#define YYTABLES_NAME   "yytables"

◆ yyterminate

#define yyterminate ( )
Value:
return YY_NULL
#define YY_NULL

Definition at line 3000 of file ugbc.yy.c.

◆ yytext_ptr

#define yytext_ptr   yytext

Definition at line 358 of file ugbc.yy.c.

Typedef Documentation

◆ YY_BUFFER_STATE

Definition at line 150 of file ugbc.yy.c.

Function Documentation

◆ if()

if ( ! yy_init)

Definition at line 3049 of file ugbc.yy.c.

◆ import_file_name()

char * import_file_name ( char * _import_path)

Definition at line 17204 of file _infrastructure.c.

◆ strcopy()

char * strcopy ( char * _dest,
char * _source )

Definition at line 17121 of file _infrastructure.c.

◆ strreplace()

char * strreplace ( const char * _orig,
const char * _rep,
const char * _with )

Definition at line 17133 of file _infrastructure.c.

◆ yy_create_buffer()

YY_BUFFER_STATE yy_create_buffer ( FILE * file,
int size )

◆ yy_delete_buffer()

void yy_delete_buffer ( YY_BUFFER_STATE b)

◆ yy_flush_buffer()

void yy_flush_buffer ( YY_BUFFER_STATE b)

◆ yy_scan_buffer()

YY_BUFFER_STATE yy_scan_buffer ( char * base,
yy_size_t size )

◆ yy_scan_bytes()

YY_BUFFER_STATE yy_scan_bytes ( const char * bytes,
int len )

◆ yy_scan_string()

YY_BUFFER_STATE yy_scan_string ( const char * yy_str)

◆ yy_switch_to_buffer()

void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer)

◆ yyalloc()

void * yyalloc ( yy_size_t )

◆ yyfree()

void yyfree ( void * )

◆ yyget_debug()

int yyget_debug ( void )

◆ yyget_extra()

YY_EXTRA_TYPE yyget_extra ( void )

◆ yyget_in()

FILE * yyget_in ( void )

◆ yyget_leng()

int yyget_leng ( void )

◆ yyget_lineno()

int yyget_lineno ( void )

◆ yyget_out()

FILE * yyget_out ( void )

◆ yyget_text()

char * yyget_text ( void )

◆ yylex()

int yylex ( void )
extern

◆ yylex_destroy()

int yylex_destroy ( void )

◆ yypop_buffer_state()

void yypop_buffer_state ( void )

◆ yypush_buffer_state()

void yypush_buffer_state ( YY_BUFFER_STATE new_buffer)

◆ yyrealloc()

void * yyrealloc ( void * ,
yy_size_t  )

◆ yyrestart()

void yyrestart ( FILE * input_file)

◆ yyset_debug()

void yyset_debug ( int debug_flag)

◆ yyset_extra()

void yyset_extra ( YY_EXTRA_TYPE user_defined)

◆ yyset_in()

void yyset_in ( FILE * _in_str)

◆ yyset_lineno()

void yyset_lineno ( int _line_number)

◆ yyset_out()

void yyset_out ( FILE * _out_str)

◆ yywrap()

int yywrap ( void )
extern

This function called by the scanner (the automaton generated by Flex) when it reaches the end of the file (EOF) it's reading. Its name stands for "wrap up" (to wrap up): its purpose is to decide whether the scanner's job is finished (1) or whether it should continue reading from another file (0).

Definition at line 237 of file ugbc.tab.c.

Variable Documentation

◆ asmSnippet

char* asmSnippet
extern

This variable will store an assembly code snippet within a program. This means that we're essentially treating the source code as a "data string". This technique is common in compiler development, emulator development, or when using inline assembly.

Definition at line 258 of file ugbc.tab.c.

◆ filenamestacked

char* filenamestacked[256]
extern

This variable contains the list of file names of files included recursively. When a file is included with the INCLUDE command, its name is inserted into this stack, from top to bottom. Conversely, when the file is finished reading, its name is popped from the stack, which empties.

Definition at line 182 of file ugbc.tab.c.

◆ importPath

char* importPath
extern

This variable holds the name of the folder containing the set of definitions to be used with the IMPORT DECLARES command. Executing this statement loads the relevant ugBASIC file for the target in question from this location. If NULL, the import path will be search against the following paths: ../../imports, ../imports and, finally, ./imports.

Definition at line 250 of file ugbc.tab.c.

◆ stacked

int stacked
extern

This variable contains the level of nested INCLUDED files, i.e. the last empty position on the stacked files.

Definition at line 174 of file ugbc.tab.c.

◆ targetName

char targetName[]
extern

Definition at line 55 of file _infrastructure.c.

◆ yy_act

int yy_act

Definition at line 3047 of file ugbc.yy.c.

◆ yy_bp

char * yy_bp

Definition at line 3046 of file ugbc.yy.c.

◆ yy_cp

char* yy_cp

Definition at line 3046 of file ugbc.yy.c.

◆ YY_DECL

YY_DECL
Initial value:
{
yy_state_type yy_current_state
int yy_state_type

The main scanner function which does all the work.

Definition at line 3043 of file ugbc.yy.c.

◆ yy_flex_debug

int yy_flex_debug = 0

Definition at line 2758 of file ugbc.yy.c.

◆ yycolno

int yycolno
extern

This variable keeps track of the current column number when reading the input file.

Definition at line 133 of file ugbc.tab.c.

◆ yycolnostacked

int yycolnostacked[]
extern

This variable keeps track of the current column number when reading the input file of files included recursively. When a file is included with the INCLUDE command, its actual line number is inserted into this stack, from top to bottom. Conversely, when the file is finished reading, its name is popped from the stack, which empties..

Definition at line 200 of file ugbc.tab.c.

◆ yyconcatlineno

int yyconcatlineno

This variable keeps track of the concatenated line number when reading the input file. In BASIC, logical lines, with commands, parameters, and so on, can be written across multiple physical lines if the last character is an underscore. This variable keeps track of the line number within the set of linked lines. Therefore, this number resets to zero whenever a new line begins, unless the previous line ends with an underscore.

Definition at line 2806 of file ugbc.yy.c.

◆ yyin

FILE* yyin = NULL

Definition at line 347 of file ugbc.yy.c.

◆ yyleng

int yyleng

Definition at line 290 of file ugbc.yy.c.

◆ yylineno

int yylineno = 1

This variable keeps track of the current line number when reading the input file. Instead of having to manually count each newline character (
), we instructed Flex to automatically update this variable whenever it encounters a newline. In Bison, we ensured that Flex supports and exports it by using the command option yylineno option in the definitions section.

Since the variable is defined in the Flex-generated code, we declare it as extern in Bison's C section to access it. Without this variable, when Bison encounters a syntax error, the yyerror function would simply return a terse "syntax error." With this variable, we can provide much more precise feedback to the user. If we reuse the same parser to parse multiple files sequentially, we reset yylineno = 1; before starting to parse a new file. Currently, this variable only counts rows. If we need to know exactly which column an ​​error is in (e.g., "line 10, character 5"), we use the more complex YYLTYPE structure with the locations in Bison.

Definition at line 352 of file ugbc.yy.c.

◆ yylinenostacked

int yylinenostacked[]
extern

This variable keeps track of the current line number when reading the input file of files included recursively. When a file is included with the INCLUDE command, its actual line number is inserted into this stack, from top to bottom. Conversely, when the file is finished reading, its name is popped from the stack, which empties..

Definition at line 191 of file ugbc.tab.c.

◆ yyout

FILE * yyout = NULL

Definition at line 160 of file ugbc.yy.c.

◆ yyposno

int yyposno
extern

This variable keeps track of the current byte position when reading the input file.

Definition at line 138 of file ugbc.tab.c.

◆ yyposnostacked

int yyposnostacked[]
extern

This variable keeps track of the current byte position when reading the input file of files included recursively. When a file is included with the INCLUDE command, its actual line number is inserted into this stack, from top to bottom. Conversely, when the file is finished reading, its name is popped from the stack, which empties.

Definition at line 209 of file ugbc.tab.c.

◆ yytext

char* yytext

Definition at line 2767 of file ugbc.yy.c.