diff --git a/interpreters/bas/Makefile b/interpreters/bas/Makefile index 819a69d0e..9414d820a 100644 --- a/interpreters/bas/Makefile +++ b/interpreters/bas/Makefile @@ -40,11 +40,11 @@ include $(APPDIR)/Make.defs # BAS Library ASRCS = -CSRCS = auto.c bas.c fs.c global.c main.c program.c str.c token.c value.c -CSRCS += var.c +CSRCS = bas.c bas_auto.c bas_fs.c bas_global.c bas_main.c bas_program.c +CSRCS += bas_str.c bas_token.c bas_value.c bas_var.c ifeq ($(CONFIG_INTERPREPTER_BAS_VT100),y) -CSRCS += vt100.c +CSRCS += bas_vt100.c endif DEPPATH = --dep-path . diff --git a/interpreters/bas/bas.c b/interpreters/bas/bas.c index 0ab8eaf3d..fdbe67e14 100644 --- a/interpreters/bas/bas.c +++ b/interpreters/bas/bas.c @@ -79,14 +79,14 @@ #include #include -#include "auto.h" +#include "bas_auto.h" #include "bas.h" -#include "error.h" -#include "fs.h" -#include "global.h" -#include "program.h" -#include "value.h" -#include "var.h" +#include "bas_error.h" +#include "bas_fs.h" +#include "bas_global.h" +#include "bas_program.h" +#include "bas_value.h" +#include "bas_var.h" /**************************************************************************** * Pre-processor Definitions @@ -2256,7 +2256,7 @@ static struct Value *dataread(struct Value *value, struct Value *l) } static struct Value more_statements; -#include "statement.c" +#include "bas_statement.c" static struct Value *statements(struct Value *value) { more: diff --git a/interpreters/bas/bas.h b/interpreters/bas/bas.h index bf1700a96..ecea33cff 100644 --- a/interpreters/bas/bas.h +++ b/interpreters/bas/bas.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/fs.h + * apps/interpreters/bas/bas.h * * Copyright (c) 1999-2014 Michael Haardt * diff --git a/interpreters/bas/auto.c b/interpreters/bas/bas_auto.c similarity index 99% rename from interpreters/bas/auto.c rename to interpreters/bas/bas_auto.c index 5a807bc93..016596c1e 100644 --- a/interpreters/bas/auto.c +++ b/interpreters/bas/bas_auto.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/auto.c + * apps/interpreters/bas/bas_auto.c * BASIC file system interface. * * Copyright (c) 1999-2014 Michael Haardt @@ -68,7 +68,7 @@ #include #include -#include "auto.h" +#include "bas_auto.h" /**************************************************************************** * Pre-processor Definitions diff --git a/interpreters/bas/auto.h b/interpreters/bas/bas_auto.h similarity index 95% rename from interpreters/bas/auto.h rename to interpreters/bas/bas_auto.h index 841ea5380..8d137bc57 100644 --- a/interpreters/bas/auto.h +++ b/interpreters/bas/bas_auto.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/auto.h + * apps/interpreters/bas/bas_auto.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,15 +56,15 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_AUTO_H -#define __APPS_EXAMPLES_BAS_AUTO_H +#ifndef __APPS_EXAMPLES_BAS_BAS_AUTO_H +#define __APPS_EXAMPLES_BAS_BAS_AUTO_H /**************************************************************************** * Included Files ****************************************************************************/ -#include "programtypes.h" -#include "var.h" +#include "bas_programtypes.h" +#include "bas_var.h" /**************************************************************************** * Public Types @@ -107,7 +107,7 @@ union AutoSlot struct Var var; }; -#include "token.h" +#include "bas_token.h" /**************************************************************************** * Public Function Prototypes @@ -130,4 +130,4 @@ enum ValueType Auto_argType(const struct Auto *this, int l); enum ValueType Auto_varType(const struct Auto *this, struct Symbol *sym); void Auto_funcEnd(struct Auto *this); -#endif /* __APPS_EXAMPLES_BAS_AUTO_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_AUTO_H */ diff --git a/interpreters/bas/autotypes.h b/interpreters/bas/bas_autotypes.h similarity index 92% rename from interpreters/bas/autotypes.h rename to interpreters/bas/bas_autotypes.h index ce736ca37..815c8baf2 100644 --- a/interpreters/bas/autotypes.h +++ b/interpreters/bas/bas_autotypes.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/autotypes.h + * apps/interpreters/bas/bas_autotypes.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,22 +56,22 @@ * ****************************************************************************/ -/* REVISIT: Why is this? If the following is __APPS_EXAMPLES_BAS_AUTOTYPES_H +/* REVISIT: Why is this? If the following is __APPS_EXAMPLES_BAS_BAS_AUTO_H * then there are compile errors! Those compile errors occur because this - * function defines some of the same structures as does auto.h. BUT, the + * function defines some of the same structures as does bas_auto.h. BUT, the * definitions ARE NOT THE SAME. What is up with this? */ -#ifndef __APPS_EXAMPLES_BAS_AUTO_H -#define __APPS_EXAMPLES_BAS_AUTO_H +#ifndef __APPS_EXAMPLES_BAS_BAS_AUTO_H +#define __APPS_EXAMPLES_BAS_BAS_AUTO_H /**************************************************************************** * Included Files ****************************************************************************/ -#include "program.h" -#include "var.h" -#include "token.h" +#include "bas_program.h" +#include "bas_var.h" +#include "bas_token.h" /**************************************************************************** * Public Types @@ -104,4 +104,4 @@ union AutoSlot struct Var var; }; -#endif /* __APPS_EXAMPLES_BAS_AUTO_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_AUTO_H */ diff --git a/interpreters/bas/error.h b/interpreters/bas/bas_error.h similarity index 98% rename from interpreters/bas/error.h rename to interpreters/bas/bas_error.h index 15af8da49..a39801ac6 100644 --- a/interpreters/bas/error.h +++ b/interpreters/bas/bas_error.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/error.h + * apps/interpreters/bas/bas_error.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,8 +56,8 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_ERROR_H -#define __APPS_EXAMPLES_BAS_ERROR_H +#ifndef __APPS_EXAMPLES_BAS_BAS_ERROR_H +#define __APPS_EXAMPLES_BAS_BAS_ERROR_H /**************************************************************************** * Pre-processor Definitions @@ -185,4 +185,4 @@ #define OUTOFMEMORY RUNTIME+20,_("Out of memory") #define RESTRICTED RUNTIME+21,_("Restricted") -#endif /* __APPS_EXAMPLES_BAS_ERROR_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_ERROR_H */ diff --git a/interpreters/bas/fs.c b/interpreters/bas/bas_fs.c similarity index 99% rename from interpreters/bas/fs.c rename to interpreters/bas/bas_fs.c index 5712b6d07..51eb324d9 100644 --- a/interpreters/bas/fs.c +++ b/interpreters/bas/bas_fs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/fs.c + * apps/interpreters/bas/bas_fs.c * BASIC file system interface. * * Copyright (c) 1999-2014 Michael Haardt @@ -81,8 +81,8 @@ #include #include -#include "vt100.h" -#include "fs.h" +#include "bas_vt100.h" +#include "bas_fs.h" /**************************************************************************** * Pre-processor Definitions diff --git a/interpreters/bas/fs.h b/interpreters/bas/bas_fs.h similarity index 97% rename from interpreters/bas/fs.h rename to interpreters/bas/bas_fs.h index 21a30452d..06324466d 100644 --- a/interpreters/bas/fs.h +++ b/interpreters/bas/bas_fs.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/fs.h + * apps/interpreters/bas/bas_fs.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,15 +56,15 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_FS_H -#define __APPS_EXAMPLES_BAS_FS_H +#ifndef __APPS_EXAMPLES_BAS_BAS_FS_H +#define __APPS_EXAMPLES_BAS_BAS_FS_H /**************************************************************************** * Included Files ****************************************************************************/ #include -#include "str.h" +#include "bas_str.h" /**************************************************************************** * Pre-processor Definitions @@ -195,4 +195,4 @@ int FS_memInput(int address); int FS_portOutput(int address, int value); int FS_memOutput(int address, int value); -#endif /* __APPS_EXAMPLES_BAS_FS_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_FS_H */ diff --git a/interpreters/bas/global.c b/interpreters/bas/bas_global.c similarity index 99% rename from interpreters/bas/global.c rename to interpreters/bas/bas_global.c index 9d7e1d504..934bd5f69 100644 --- a/interpreters/bas/global.c +++ b/interpreters/bas/bas_global.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/global.c + * apps/interpreters/bas/bas_global.c * Global variables and functions. * * Copyright (c) 1999-2014 Michael Haardt @@ -75,12 +75,12 @@ #include #include -#include "auto.h" +#include "bas_auto.h" #include "bas.h" -#include "error.h" -#include "fs.h" -#include "global.h" -#include "var.h" +#include "bas_error.h" +#include "bas_fs.h" +#include "bas_global.h" +#include "bas_var.h" #include diff --git a/interpreters/bas/global.h b/interpreters/bas/bas_global.h similarity index 95% rename from interpreters/bas/global.h rename to interpreters/bas/bas_global.h index bd91d4a02..6fc1c9caf 100644 --- a/interpreters/bas/global.h +++ b/interpreters/bas/bas_global.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/global.h + * apps/interpreters/bas/bas_global.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,16 +56,16 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_GLOBAL_H -#define __APPS_EXAMPLES_BAS_GLOBAL_H +#ifndef __APPS_EXAMPLES_BAS_BAS_GLOBAL_H +#define __APPS_EXAMPLES_BAS_BAS_GLOBAL_H /**************************************************************************** * Included Files ****************************************************************************/ -#include "token.h" -#include "value.h" -#include "var.h" +#include "bas_token.h" +#include "bas_value.h" +#include "bas_var.h" /**************************************************************************** * Pre-processor Definitions @@ -108,4 +108,4 @@ int Global_variable(struct Global *this, struct Identifier *ident, enum ValueType type, enum SymbolType symbolType, int redeclare); -#endif /* __APPS_EXAMPLES_BAS_GLOBAL_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_GLOBAL_H */ diff --git a/interpreters/bas/main.c b/interpreters/bas/bas_main.c similarity index 99% rename from interpreters/bas/main.c rename to interpreters/bas/bas_main.c index bf8dd4e65..f0062aa8b 100644 --- a/interpreters/bas/main.c +++ b/interpreters/bas/bas_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/main.c + * apps/interpreters/bas/bas_main.c * * Copyright (c) 1999-2014 Michael Haardt * @@ -69,7 +69,7 @@ #include #include -#include "fs.h" +#include "bas_fs.h" #include "bas.h" /**************************************************************************** diff --git a/interpreters/bas/program.c b/interpreters/bas/bas_program.c similarity index 99% rename from interpreters/bas/program.c rename to interpreters/bas/bas_program.c index 893825d8d..ead14e52f 100644 --- a/interpreters/bas/program.c +++ b/interpreters/bas/bas_program.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/value.c + * apps/interpreters/bas/bas_program.c * Program storage. * * Copyright (c) 1999-2014 Michael Haardt @@ -69,10 +69,10 @@ #include #include -#include "auto.h" -#include "error.h" -#include "fs.h" -#include "program.h" +#include "bas_auto.h" +#include "bas_error.h" +#include "bas_fs.h" +#include "bas_program.h" /**************************************************************************** * Pre-processor Definitions diff --git a/interpreters/bas/program.h b/interpreters/bas/bas_program.h similarity index 96% rename from interpreters/bas/program.h rename to interpreters/bas/bas_program.h index b50ff0951..42bf8abca 100644 --- a/interpreters/bas/program.h +++ b/interpreters/bas/bas_program.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/program.h + * apps/interpreters/bas/bas_program.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,15 +56,15 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_PROGRAM_H -#define __APPS_EXAMPLES_BAS_PROGRAM_H +#ifndef __APPS_EXAMPLES_BAS_BAS_PROGRAM_H +#define __APPS_EXAMPLES_BAS_BAS_PROGRAM_H /**************************************************************************** * Included Files ****************************************************************************/ -#include "programtypes.h" -#include "token.h" +#include "bas_programtypes.h" +#include "bas_token.h" /**************************************************************************** * Public Function Prototypes @@ -111,4 +111,4 @@ void Program_unnum(struct Program *this); int Program_setname(struct Program *this, const char *filename); void Program_xref(struct Program *this, int chn); -#endif /* __APPS_EXAMPLES_BAS_PROGRAM_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_PROGRAM_H */ diff --git a/interpreters/bas/programtypes.h b/interpreters/bas/bas_programtypes.h similarity index 94% rename from interpreters/bas/programtypes.h rename to interpreters/bas/bas_programtypes.h index b5c1e9c1a..a22b181bc 100644 --- a/interpreters/bas/programtypes.h +++ b/interpreters/bas/bas_programtypes.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/programtypes.h + * apps/interpreters/bas/bas_programtypes.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,14 +56,14 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_PROGRAMTYPES_H -#define __APPS_EXAMPLES_BAS_PROGRAMTYPES_H +#ifndef __APPS_EXAMPLES_BAS_BAS_PROGRAMTYPES_H +#define __APPS_EXAMPLES_BAS_BAS_PROGRAMTYPES_H /**************************************************************************** * Included Files ****************************************************************************/ -#include "str.h" +#include "bas_str.h" /**************************************************************************** * Public Types @@ -96,4 +96,4 @@ struct Program struct Scope *scope; }; -#endif /* __APPS_EXAMPLES_BAS_PROGRAMTYPES_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_PROGRAMTYPES_H */ diff --git a/interpreters/bas/statement.c b/interpreters/bas/bas_statement.c similarity index 99% rename from interpreters/bas/statement.c rename to interpreters/bas/bas_statement.c index cd9ea6f86..08bf46c65 100644 --- a/interpreters/bas/statement.c +++ b/interpreters/bas/bas_statement.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/var.c + * apps/interpreters/bas/bas_statement.c * * Copyright (c) 1999-2014 Michael Haardt * @@ -64,7 +64,7 @@ #include -#include "statement.h" +#include "bas_statement.h" /**************************************************************************** * Pre-processor Definitions diff --git a/interpreters/bas/statement.h b/interpreters/bas/bas_statement.h similarity index 100% rename from interpreters/bas/statement.h rename to interpreters/bas/bas_statement.h diff --git a/interpreters/bas/str.c b/interpreters/bas/bas_str.c similarity index 99% rename from interpreters/bas/str.c rename to interpreters/bas/bas_str.c index 134cb0634..075f5529a 100644 --- a/interpreters/bas/str.c +++ b/interpreters/bas/bas_str.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/value.c + * apps/interpreters/bas/bas_str.c * Dynamic strings. * * Copyright (c) 1999-2014 Michael Haardt @@ -71,7 +71,7 @@ #include #include -#include "str.h" +#include "bas_str.h" /**************************************************************************** * Public Functions diff --git a/interpreters/bas/str.h b/interpreters/bas/bas_str.h similarity index 97% rename from interpreters/bas/str.h rename to interpreters/bas/bas_str.h index 9c706a27b..0fb54ae02 100644 --- a/interpreters/bas/str.h +++ b/interpreters/bas/bas_str.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/str.h + * apps/interpreters/bas/bas_str.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,8 +56,8 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_STR_H -#define __APPS_EXAMPLES_BAS_STR_H +#ifndef __APPS_EXAMPLES_BAS_BAS_STR_H +#define __APPS_EXAMPLES_BAS_BAS_STR_H /**************************************************************************** * Included Files @@ -112,4 +112,4 @@ void String_set(struct String *this, size_t pos, const struct String *s, struct StringField *StringField_new(struct StringField *this); void StringField_destroy(struct StringField *this); -#endif /* __APPS_EXAMPLES_BAS_STR_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_STR_H */ diff --git a/interpreters/bas/token.c b/interpreters/bas/bas_token.c similarity index 97% rename from interpreters/bas/token.c rename to interpreters/bas/bas_token.c index f8fb352dd..8c0e39aa8 100644 --- a/interpreters/bas/token.c +++ b/interpreters/bas/bas_token.c @@ -1383,9 +1383,9 @@ int yy_flex_debug = 0; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "token.l" +#line 1 "bas_token.l" /* Tokens and token sequence arrays. */ -#line 3 "token.l" +#line 3 "bas_token.l" /* #includes */ /*{{{C}}}*//*{{{*/ #include @@ -1399,9 +1399,9 @@ char *yytext; #include #include -#include "auto.h" -#include "token.h" -#include "statement.h" +#include "bas_auto.h" +#include "bas_token.h" +#include "bas_statement.h" static int g_matchdata; static int g_backslash_colon; @@ -1670,7 +1670,7 @@ YY_DECL } { -#line 102 "token.l" +#line 102 "bas_token.l" /* flex rules */ /*{{{*/ if (g_matchdata) BEGIN(DATAINPUT); @@ -1734,12 +1734,12 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 106 "token.l" +#line 106 "bas_token.l" return T_CHANNEL; YY_BREAK case 2: YY_RULE_SETUP -#line 107 "token.l" +#line 107 "bas_token.l" { int overflow; double d; @@ -1757,7 +1757,7 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 121 "token.l" +#line 121 "bas_token.l" { int overflow; long int n; @@ -1783,7 +1783,7 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 143 "token.l" +#line 143 "bas_token.l" { int overflow; long int n; @@ -1801,7 +1801,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 157 "token.l" +#line 157 "bas_token.l" { int overflow; long int n; @@ -1820,7 +1820,7 @@ YY_RULE_SETUP case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 171 "token.l" +#line 171 "bas_token.l" string(yytext); return T_STRING; YY_BREAK case 7: @@ -1830,47 +1830,47 @@ YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 172 "token.l" +#line 172 "bas_token.l" string2(); return T_STRING; YY_BREAK case 8: YY_RULE_SETUP -#line 173 "token.l" +#line 173 "bas_token.l" return T_OP; YY_BREAK case 9: YY_RULE_SETUP -#line 174 "token.l" +#line 174 "bas_token.l" return T_CP; YY_BREAK case 10: YY_RULE_SETUP -#line 175 "token.l" +#line 175 "bas_token.l" return T_MULT; YY_BREAK case 11: YY_RULE_SETUP -#line 176 "token.l" +#line 176 "bas_token.l" return T_PLUS; YY_BREAK case 12: YY_RULE_SETUP -#line 177 "token.l" +#line 177 "bas_token.l" return T_MINUS; YY_BREAK case 13: YY_RULE_SETUP -#line 178 "token.l" +#line 178 "bas_token.l" return T_COMMA; YY_BREAK case 14: YY_RULE_SETUP -#line 179 "token.l" +#line 179 "bas_token.l" return T_DIV; YY_BREAK case 15: YY_RULE_SETUP -#line 180 "token.l" +#line 180 "bas_token.l" { if (g_backslash_colon) { @@ -1882,7 +1882,7 @@ YY_RULE_SETUP YY_BREAK case 16: YY_RULE_SETUP -#line 188 "token.l" +#line 188 "bas_token.l" { if (cur) { @@ -1893,32 +1893,32 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 195 "token.l" +#line 195 "bas_token.l" return T_SEMICOLON; YY_BREAK case 18: YY_RULE_SETUP -#line 196 "token.l" +#line 196 "bas_token.l" return T_LT; YY_BREAK case 19: YY_RULE_SETUP -#line 197 "token.l" +#line 197 "bas_token.l" return T_LE; YY_BREAK case 20: YY_RULE_SETUP -#line 198 "token.l" +#line 198 "bas_token.l" return T_LE; YY_BREAK case 21: YY_RULE_SETUP -#line 199 "token.l" +#line 199 "bas_token.l" return T_NE; YY_BREAK case 22: YY_RULE_SETUP -#line 200 "token.l" +#line 200 "bas_token.l" { if (cur) { @@ -1929,52 +1929,52 @@ YY_RULE_SETUP YY_BREAK case 23: YY_RULE_SETUP -#line 207 "token.l" +#line 207 "bas_token.l" return T_GT; YY_BREAK case 24: YY_RULE_SETUP -#line 208 "token.l" +#line 208 "bas_token.l" return T_GE; YY_BREAK case 25: YY_RULE_SETUP -#line 209 "token.l" +#line 209 "bas_token.l" return T_GE; YY_BREAK case 26: YY_RULE_SETUP -#line 210 "token.l" +#line 210 "bas_token.l" return T_POW; YY_BREAK case 27: YY_RULE_SETUP -#line 211 "token.l" +#line 211 "bas_token.l" return T_ACCESS_READ; YY_BREAK case 28: YY_RULE_SETUP -#line 212 "token.l" +#line 212 "bas_token.l" return T_ACCESS_READ_WRITE; YY_BREAK case 29: YY_RULE_SETUP -#line 213 "token.l" +#line 213 "bas_token.l" return T_ACCESS_WRITE; YY_BREAK case 30: YY_RULE_SETUP -#line 214 "token.l" +#line 214 "bas_token.l" return T_AND; YY_BREAK case 31: YY_RULE_SETUP -#line 215 "token.l" +#line 215 "bas_token.l" return T_AS; YY_BREAK case 32: YY_RULE_SETUP -#line 216 "token.l" +#line 216 "bas_token.l" { if (cur) { @@ -1985,7 +1985,7 @@ YY_RULE_SETUP YY_BREAK case 33: YY_RULE_SETUP -#line 223 "token.l" +#line 223 "bas_token.l" { if (cur) { @@ -1997,7 +1997,7 @@ YY_RULE_SETUP YY_BREAK case 34: YY_RULE_SETUP -#line 231 "token.l" +#line 231 "bas_token.l" { if (cur) { @@ -2009,7 +2009,7 @@ YY_RULE_SETUP YY_BREAK case 35: YY_RULE_SETUP -#line 239 "token.l" +#line 239 "bas_token.l" { if (cur) { @@ -2020,7 +2020,7 @@ YY_RULE_SETUP YY_BREAK case 36: YY_RULE_SETUP -#line 246 "token.l" +#line 246 "bas_token.l" { if (cur) { @@ -2031,7 +2031,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 253 "token.l" +#line 253 "bas_token.l" { if (cur) { @@ -2045,7 +2045,7 @@ case 38: (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 260 "token.l" +#line 260 "bas_token.l" { if (cur) { @@ -2056,7 +2056,7 @@ YY_RULE_SETUP YY_BREAK case 39: YY_RULE_SETUP -#line 267 "token.l" +#line 267 "bas_token.l" { if (cur) { @@ -2067,7 +2067,7 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -#line 274 "token.l" +#line 274 "bas_token.l" { if (cur) { @@ -2078,12 +2078,12 @@ YY_RULE_SETUP YY_BREAK case 41: YY_RULE_SETUP -#line 281 "token.l" +#line 281 "bas_token.l" return T_CON; YY_BREAK case 42: YY_RULE_SETUP -#line 282 "token.l" +#line 282 "bas_token.l" { if (cur) { @@ -2094,7 +2094,7 @@ YY_RULE_SETUP YY_BREAK case 43: YY_RULE_SETUP -#line 289 "token.l" +#line 289 "bas_token.l" { BEGIN(DATAINPUT); if (cur) @@ -2107,7 +2107,7 @@ YY_RULE_SETUP case 44: /* rule 44 can match eol */ YY_RULE_SETUP -#line 297 "token.l" +#line 297 "bas_token.l" string(yytext); return T_STRING; YY_BREAK case 45: @@ -2117,17 +2117,17 @@ YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 298 "token.l" +#line 298 "bas_token.l" string2(); return T_STRING; YY_BREAK case 46: YY_RULE_SETUP -#line 299 "token.l" +#line 299 "bas_token.l" return T_COMMA; YY_BREAK case 47: YY_RULE_SETUP -#line 300 "token.l" +#line 300 "bas_token.l" { if (cur) cur->u.datainput=strcpy(malloc(strlen(yytext)+1),yytext); return T_DATAINPUT; @@ -2135,23 +2135,23 @@ YY_RULE_SETUP YY_BREAK case 48: YY_RULE_SETUP -#line 304 "token.l" +#line 304 "bas_token.l" YY_BREAK case 49: /* rule 49 can match eol */ YY_RULE_SETUP -#line 305 "token.l" +#line 305 "bas_token.l" BEGIN(INITIAL); YY_BREAK case 50: YY_RULE_SETUP -#line 306 "token.l" +#line 306 "bas_token.l" BEGIN(INITIAL); return T_COLON; YY_BREAK case 51: YY_RULE_SETUP -#line 307 "token.l" +#line 307 "bas_token.l" { if (cur) { @@ -2162,7 +2162,7 @@ YY_RULE_SETUP YY_BREAK case 52: YY_RULE_SETUP -#line 314 "token.l" +#line 314 "bas_token.l" { if (cur) { @@ -2173,7 +2173,7 @@ YY_RULE_SETUP YY_BREAK case 53: YY_RULE_SETUP -#line 321 "token.l" +#line 321 "bas_token.l" { if (cur) { @@ -2184,7 +2184,7 @@ YY_RULE_SETUP YY_BREAK case 54: YY_RULE_SETUP -#line 328 "token.l" +#line 328 "bas_token.l" { if (cur) { @@ -2198,7 +2198,7 @@ case 55: (yy_c_buf_p) = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 335 "token.l" +#line 335 "bas_token.l" { if (cur) { @@ -2213,7 +2213,7 @@ case 56: (yy_c_buf_p) = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 343 "token.l" +#line 343 "bas_token.l" { if (cur) { @@ -2225,7 +2225,7 @@ YY_RULE_SETUP YY_BREAK case 57: YY_RULE_SETUP -#line 351 "token.l" +#line 351 "bas_token.l" { if (cur) { @@ -2236,7 +2236,7 @@ YY_RULE_SETUP YY_BREAK case 58: YY_RULE_SETUP -#line 358 "token.l" +#line 358 "bas_token.l" { if (cur) { @@ -2247,7 +2247,7 @@ YY_RULE_SETUP YY_BREAK case 59: YY_RULE_SETUP -#line 365 "token.l" +#line 365 "bas_token.l" { if (cur) { @@ -2258,7 +2258,7 @@ YY_RULE_SETUP YY_BREAK case 60: YY_RULE_SETUP -#line 372 "token.l" +#line 372 "bas_token.l" { if (cur) { @@ -2269,7 +2269,7 @@ YY_RULE_SETUP YY_BREAK case 61: YY_RULE_SETUP -#line 379 "token.l" +#line 379 "bas_token.l" { if (cur) { @@ -2280,7 +2280,7 @@ YY_RULE_SETUP YY_BREAK case 62: YY_RULE_SETUP -#line 386 "token.l" +#line 386 "bas_token.l" { if (cur) { @@ -2291,7 +2291,7 @@ YY_RULE_SETUP YY_BREAK case 63: YY_RULE_SETUP -#line 393 "token.l" +#line 393 "bas_token.l" { if (cur) { @@ -2302,7 +2302,7 @@ YY_RULE_SETUP YY_BREAK case 64: YY_RULE_SETUP -#line 400 "token.l" +#line 400 "bas_token.l" { if (cur) { @@ -2316,7 +2316,7 @@ case 65: (yy_c_buf_p) = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 407 "token.l" +#line 407 "bas_token.l" { BEGIN(ELSEIF); if (cur) @@ -2328,7 +2328,7 @@ YY_RULE_SETUP YY_BREAK case 66: YY_RULE_SETUP -#line 415 "token.l" +#line 415 "bas_token.l" { BEGIN(INITIAL); if (cur) @@ -2340,7 +2340,7 @@ YY_RULE_SETUP YY_BREAK case 67: YY_RULE_SETUP -#line 423 "token.l" +#line 423 "bas_token.l" { if (cur) { @@ -2351,7 +2351,7 @@ YY_RULE_SETUP YY_BREAK case 68: YY_RULE_SETUP -#line 430 "token.l" +#line 430 "bas_token.l" { if (cur) { @@ -2362,7 +2362,7 @@ YY_RULE_SETUP YY_BREAK case 69: YY_RULE_SETUP -#line 437 "token.l" +#line 437 "bas_token.l" { if (cur) { @@ -2373,7 +2373,7 @@ YY_RULE_SETUP YY_BREAK case 70: YY_RULE_SETUP -#line 444 "token.l" +#line 444 "bas_token.l" { if (cur) { @@ -2384,7 +2384,7 @@ YY_RULE_SETUP YY_BREAK case 71: YY_RULE_SETUP -#line 451 "token.l" +#line 451 "bas_token.l" { if (cur) { @@ -2395,7 +2395,7 @@ YY_RULE_SETUP YY_BREAK case 72: YY_RULE_SETUP -#line 458 "token.l" +#line 458 "bas_token.l" { if (cur) { @@ -2406,7 +2406,7 @@ YY_RULE_SETUP YY_BREAK case 73: YY_RULE_SETUP -#line 465 "token.l" +#line 465 "bas_token.l" { if (cur) { @@ -2417,7 +2417,7 @@ YY_RULE_SETUP YY_BREAK case 74: YY_RULE_SETUP -#line 472 "token.l" +#line 472 "bas_token.l" { if (cur) { @@ -2428,12 +2428,12 @@ YY_RULE_SETUP YY_BREAK case 75: YY_RULE_SETUP -#line 479 "token.l" +#line 479 "bas_token.l" return T_EQV; YY_BREAK case 76: YY_RULE_SETUP -#line 480 "token.l" +#line 480 "bas_token.l" { if (cur) { @@ -2444,7 +2444,7 @@ YY_RULE_SETUP YY_BREAK case 77: YY_RULE_SETUP -#line 487 "token.l" +#line 487 "bas_token.l" { if (cur) { @@ -2455,7 +2455,7 @@ YY_RULE_SETUP YY_BREAK case 78: YY_RULE_SETUP -#line 494 "token.l" +#line 494 "bas_token.l" { if (cur) { @@ -2466,7 +2466,7 @@ YY_RULE_SETUP YY_BREAK case 79: YY_RULE_SETUP -#line 501 "token.l" +#line 501 "bas_token.l" { if (cur) { @@ -2477,7 +2477,7 @@ YY_RULE_SETUP YY_BREAK case 80: YY_RULE_SETUP -#line 508 "token.l" +#line 508 "bas_token.l" { if (cur) { @@ -2491,7 +2491,7 @@ case 81: (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 515 "token.l" +#line 515 "bas_token.l" { if (cur) { @@ -2502,7 +2502,7 @@ YY_RULE_SETUP YY_BREAK case 82: YY_RULE_SETUP -#line 522 "token.l" +#line 522 "bas_token.l" { if (cur) { @@ -2513,7 +2513,7 @@ YY_RULE_SETUP YY_BREAK case 83: YY_RULE_SETUP -#line 529 "token.l" +#line 529 "bas_token.l" { if (cur) { @@ -2524,7 +2524,7 @@ YY_RULE_SETUP YY_BREAK case 84: YY_RULE_SETUP -#line 536 "token.l" +#line 536 "bas_token.l" { if (cur) { @@ -2535,32 +2535,32 @@ YY_RULE_SETUP YY_BREAK case 85: YY_RULE_SETUP -#line 543 "token.l" +#line 543 "bas_token.l" return T_FOR_INPUT; YY_BREAK case 86: YY_RULE_SETUP -#line 544 "token.l" +#line 544 "bas_token.l" return T_FOR_OUTPUT; YY_BREAK case 87: YY_RULE_SETUP -#line 545 "token.l" +#line 545 "bas_token.l" return T_FOR_APPEND; YY_BREAK case 88: YY_RULE_SETUP -#line 546 "token.l" +#line 546 "bas_token.l" return T_FOR_RANDOM; YY_BREAK case 89: YY_RULE_SETUP -#line 547 "token.l" +#line 547 "bas_token.l" return T_FOR_BINARY; YY_BREAK case 90: YY_RULE_SETUP -#line 548 "token.l" +#line 548 "bas_token.l" { if (cur) { @@ -2572,7 +2572,7 @@ YY_RULE_SETUP YY_BREAK case 91: YY_RULE_SETUP -#line 556 "token.l" +#line 556 "bas_token.l" { if (cur) { @@ -2586,7 +2586,7 @@ case 92: (yy_c_buf_p) = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 563 "token.l" +#line 563 "bas_token.l" { if (cur) { @@ -2597,7 +2597,7 @@ YY_RULE_SETUP YY_BREAK case 93: YY_RULE_SETUP -#line 570 "token.l" +#line 570 "bas_token.l" { if (cur) { @@ -2608,7 +2608,7 @@ YY_RULE_SETUP YY_BREAK case 94: YY_RULE_SETUP -#line 577 "token.l" +#line 577 "bas_token.l" { if (cur) { @@ -2619,12 +2619,12 @@ YY_RULE_SETUP YY_BREAK case 95: YY_RULE_SETUP -#line 584 "token.l" +#line 584 "bas_token.l" return T_IDN; YY_BREAK case 96: YY_RULE_SETUP -#line 585 "token.l" +#line 585 "bas_token.l" { if (cur) { @@ -2638,7 +2638,7 @@ case 97: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 592 "token.l" +#line 592 "bas_token.l" { BEGIN(IMAGEFMT); if (cur) @@ -2653,7 +2653,7 @@ case 98: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 600 "token.l" +#line 600 "bas_token.l" { BEGIN(INITIAL); if (cur) @@ -2670,7 +2670,7 @@ YY_RULE_SETUP YY_BREAK case 99: YY_RULE_SETUP -#line 613 "token.l" +#line 613 "bas_token.l" { if (cur) { @@ -2681,12 +2681,12 @@ YY_RULE_SETUP YY_BREAK case 100: YY_RULE_SETUP -#line 620 "token.l" +#line 620 "bas_token.l" return T_IMP; YY_BREAK case 101: YY_RULE_SETUP -#line 621 "token.l" +#line 621 "bas_token.l" { if (cur) { @@ -2697,7 +2697,7 @@ YY_RULE_SETUP YY_BREAK case 102: YY_RULE_SETUP -#line 628 "token.l" +#line 628 "bas_token.l" { if (cur) { @@ -2711,7 +2711,7 @@ case 103: (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 635 "token.l" +#line 635 "bas_token.l" { if (cur) { @@ -2722,17 +2722,17 @@ YY_RULE_SETUP YY_BREAK case 104: YY_RULE_SETUP -#line 642 "token.l" +#line 642 "bas_token.l" return T_INV; YY_BREAK case 105: YY_RULE_SETUP -#line 643 "token.l" +#line 643 "bas_token.l" return T_IS; YY_BREAK case 106: YY_RULE_SETUP -#line 644 "token.l" +#line 644 "bas_token.l" { if (cur) { @@ -2743,7 +2743,7 @@ YY_RULE_SETUP YY_BREAK case 107: YY_RULE_SETUP -#line 651 "token.l" +#line 651 "bas_token.l" { if (cur) { @@ -2754,7 +2754,7 @@ YY_RULE_SETUP YY_BREAK case 108: YY_RULE_SETUP -#line 658 "token.l" +#line 658 "bas_token.l" { if (cur) { @@ -2765,7 +2765,7 @@ YY_RULE_SETUP YY_BREAK case 109: YY_RULE_SETUP -#line 665 "token.l" +#line 665 "bas_token.l" { if (cur) { @@ -2776,7 +2776,7 @@ YY_RULE_SETUP YY_BREAK case 110: YY_RULE_SETUP -#line 672 "token.l" +#line 672 "bas_token.l" { if (cur) { @@ -2787,7 +2787,7 @@ YY_RULE_SETUP YY_BREAK case 111: YY_RULE_SETUP -#line 679 "token.l" +#line 679 "bas_token.l" { if (cur) { @@ -2798,7 +2798,7 @@ YY_RULE_SETUP YY_BREAK case 112: YY_RULE_SETUP -#line 686 "token.l" +#line 686 "bas_token.l" { if (cur) { @@ -2809,7 +2809,7 @@ YY_RULE_SETUP YY_BREAK case 113: YY_RULE_SETUP -#line 693 "token.l" +#line 693 "bas_token.l" { if (cur) { @@ -2820,17 +2820,17 @@ YY_RULE_SETUP YY_BREAK case 114: YY_RULE_SETUP -#line 700 "token.l" +#line 700 "bas_token.l" return T_LOCK_READ; YY_BREAK case 115: YY_RULE_SETUP -#line 701 "token.l" +#line 701 "bas_token.l" return T_LOCK_WRITE; YY_BREAK case 116: YY_RULE_SETUP -#line 702 "token.l" +#line 702 "bas_token.l" { if (cur) { @@ -2841,7 +2841,7 @@ YY_RULE_SETUP YY_BREAK case 117: YY_RULE_SETUP -#line 709 "token.l" +#line 709 "bas_token.l" { if (cur) { @@ -2852,7 +2852,7 @@ YY_RULE_SETUP YY_BREAK case 118: YY_RULE_SETUP -#line 716 "token.l" +#line 716 "bas_token.l" { if (cur) { @@ -2863,7 +2863,7 @@ YY_RULE_SETUP YY_BREAK case 119: YY_RULE_SETUP -#line 723 "token.l" +#line 723 "bas_token.l" { if (cur) { @@ -2874,7 +2874,7 @@ YY_RULE_SETUP YY_BREAK case 120: YY_RULE_SETUP -#line 730 "token.l" +#line 730 "bas_token.l" { if (cur) { @@ -2885,7 +2885,7 @@ YY_RULE_SETUP YY_BREAK case 121: YY_RULE_SETUP -#line 737 "token.l" +#line 737 "bas_token.l" { if (cur) { @@ -2896,7 +2896,7 @@ YY_RULE_SETUP YY_BREAK case 122: YY_RULE_SETUP -#line 744 "token.l" +#line 744 "bas_token.l" { if (cur) { @@ -2907,7 +2907,7 @@ YY_RULE_SETUP YY_BREAK case 123: YY_RULE_SETUP -#line 751 "token.l" +#line 751 "bas_token.l" { if (cur) { @@ -2918,7 +2918,7 @@ YY_RULE_SETUP YY_BREAK case 124: YY_RULE_SETUP -#line 758 "token.l" +#line 758 "bas_token.l" { if (cur) { @@ -2929,7 +2929,7 @@ YY_RULE_SETUP YY_BREAK case 125: YY_RULE_SETUP -#line 765 "token.l" +#line 765 "bas_token.l" { if (cur) { @@ -2940,7 +2940,7 @@ YY_RULE_SETUP YY_BREAK case 126: YY_RULE_SETUP -#line 772 "token.l" +#line 772 "bas_token.l" { if (cur) { @@ -2951,12 +2951,12 @@ YY_RULE_SETUP YY_BREAK case 127: YY_RULE_SETUP -#line 779 "token.l" +#line 779 "bas_token.l" return T_MOD; YY_BREAK case 128: YY_RULE_SETUP -#line 780 "token.l" +#line 780 "bas_token.l" { if (cur) { @@ -2967,7 +2967,7 @@ YY_RULE_SETUP YY_BREAK case 129: YY_RULE_SETUP -#line 787 "token.l" +#line 787 "bas_token.l" { if (cur) { @@ -2978,7 +2978,7 @@ YY_RULE_SETUP YY_BREAK case 130: YY_RULE_SETUP -#line 794 "token.l" +#line 794 "bas_token.l" { if (cur) { @@ -2990,12 +2990,12 @@ YY_RULE_SETUP YY_BREAK case 131: YY_RULE_SETUP -#line 802 "token.l" +#line 802 "bas_token.l" return T_NOT; YY_BREAK case 132: YY_RULE_SETUP -#line 803 "token.l" +#line 803 "bas_token.l" { if (cur) { @@ -3006,7 +3006,7 @@ YY_RULE_SETUP YY_BREAK case 133: YY_RULE_SETUP -#line 810 "token.l" +#line 810 "bas_token.l" { if (cur) { @@ -3017,7 +3017,7 @@ YY_RULE_SETUP YY_BREAK case 134: YY_RULE_SETUP -#line 817 "token.l" +#line 817 "bas_token.l" { if (cur) { @@ -3028,7 +3028,7 @@ YY_RULE_SETUP YY_BREAK case 135: YY_RULE_SETUP -#line 824 "token.l" +#line 824 "bas_token.l" { if (cur) { @@ -3041,7 +3041,7 @@ YY_RULE_SETUP YY_BREAK case 136: YY_RULE_SETUP -#line 833 "token.l" +#line 833 "bas_token.l" { if (cur) { @@ -3052,7 +3052,7 @@ YY_RULE_SETUP YY_BREAK case 137: YY_RULE_SETUP -#line 840 "token.l" +#line 840 "bas_token.l" { if (cur) { @@ -3063,7 +3063,7 @@ YY_RULE_SETUP YY_BREAK case 138: YY_RULE_SETUP -#line 847 "token.l" +#line 847 "bas_token.l" { if (cur) { @@ -3074,7 +3074,7 @@ YY_RULE_SETUP YY_BREAK case 139: YY_RULE_SETUP -#line 854 "token.l" +#line 854 "bas_token.l" { if (cur) { @@ -3085,12 +3085,12 @@ YY_RULE_SETUP YY_BREAK case 140: YY_RULE_SETUP -#line 861 "token.l" +#line 861 "bas_token.l" return T_OR; YY_BREAK case 141: YY_RULE_SETUP -#line 862 "token.l" +#line 862 "bas_token.l" { if (cur) { @@ -3101,7 +3101,7 @@ YY_RULE_SETUP YY_BREAK case 142: YY_RULE_SETUP -#line 869 "token.l" +#line 869 "bas_token.l" { if (cur) { @@ -3115,7 +3115,7 @@ case 143: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 876 "token.l" +#line 876 "bas_token.l" { if (cur) { @@ -3126,7 +3126,7 @@ YY_RULE_SETUP YY_BREAK case 144: YY_RULE_SETUP -#line 883 "token.l" +#line 883 "bas_token.l" { if (cur) { @@ -3137,7 +3137,7 @@ YY_RULE_SETUP YY_BREAK case 145: YY_RULE_SETUP -#line 890 "token.l" +#line 890 "bas_token.l" { if (cur) { @@ -3151,7 +3151,7 @@ case 146: (yy_c_buf_p) = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 897 "token.l" +#line 897 "bas_token.l" { if (cur) { @@ -3162,7 +3162,7 @@ YY_RULE_SETUP YY_BREAK case 147: YY_RULE_SETUP -#line 904 "token.l" +#line 904 "bas_token.l" { if (cur) { @@ -3173,7 +3173,7 @@ YY_RULE_SETUP YY_BREAK case 148: YY_RULE_SETUP -#line 911 "token.l" +#line 911 "bas_token.l" { if (cur) { @@ -3184,7 +3184,7 @@ YY_RULE_SETUP YY_BREAK case 149: YY_RULE_SETUP -#line 918 "token.l" +#line 918 "bas_token.l" { if (cur) { @@ -3195,7 +3195,7 @@ YY_RULE_SETUP YY_BREAK case 150: YY_RULE_SETUP -#line 925 "token.l" +#line 925 "bas_token.l" { if (cur) { @@ -3206,7 +3206,7 @@ YY_RULE_SETUP YY_BREAK case 151: YY_RULE_SETUP -#line 932 "token.l" +#line 932 "bas_token.l" { if (cur) { @@ -3217,7 +3217,7 @@ YY_RULE_SETUP YY_BREAK case 152: YY_RULE_SETUP -#line 939 "token.l" +#line 939 "bas_token.l" { if (cur) { @@ -3228,7 +3228,7 @@ YY_RULE_SETUP YY_BREAK case 153: YY_RULE_SETUP -#line 946 "token.l" +#line 946 "bas_token.l" { if (cur) { @@ -3239,7 +3239,7 @@ YY_RULE_SETUP YY_BREAK case 154: YY_RULE_SETUP -#line 953 "token.l" +#line 953 "bas_token.l" { if (cur) { @@ -3250,7 +3250,7 @@ YY_RULE_SETUP YY_BREAK case 155: YY_RULE_SETUP -#line 960 "token.l" +#line 960 "bas_token.l" { if (cur) { @@ -3261,7 +3261,7 @@ YY_RULE_SETUP YY_BREAK case 156: YY_RULE_SETUP -#line 967 "token.l" +#line 967 "bas_token.l" { if (cur) { @@ -3272,7 +3272,7 @@ YY_RULE_SETUP YY_BREAK case 157: YY_RULE_SETUP -#line 974 "token.l" +#line 974 "bas_token.l" { if (cur) { @@ -3284,12 +3284,12 @@ YY_RULE_SETUP YY_BREAK case 158: YY_RULE_SETUP -#line 982 "token.l" +#line 982 "bas_token.l" return T_SHARED; YY_BREAK case 159: YY_RULE_SETUP -#line 983 "token.l" +#line 983 "bas_token.l" { if (cur) { @@ -3300,7 +3300,7 @@ YY_RULE_SETUP YY_BREAK case 160: YY_RULE_SETUP -#line 990 "token.l" +#line 990 "bas_token.l" { if (cur) { @@ -3311,17 +3311,17 @@ YY_RULE_SETUP YY_BREAK case 161: YY_RULE_SETUP -#line 997 "token.l" +#line 997 "bas_token.l" return T_SPC; YY_BREAK case 162: YY_RULE_SETUP -#line 998 "token.l" +#line 998 "bas_token.l" return T_STEP; YY_BREAK case 163: YY_RULE_SETUP -#line 999 "token.l" +#line 999 "bas_token.l" { if (cur) { @@ -3332,7 +3332,7 @@ YY_RULE_SETUP YY_BREAK case 164: YY_RULE_SETUP -#line 1006 "token.l" +#line 1006 "bas_token.l" { if (cur) { @@ -3343,7 +3343,7 @@ YY_RULE_SETUP YY_BREAK case 165: YY_RULE_SETUP -#line 1013 "token.l" +#line 1013 "bas_token.l" { if (cur) { @@ -3354,7 +3354,7 @@ YY_RULE_SETUP YY_BREAK case 166: YY_RULE_SETUP -#line 1020 "token.l" +#line 1020 "bas_token.l" { if (cur) { @@ -3366,7 +3366,7 @@ YY_RULE_SETUP YY_BREAK case 167: YY_RULE_SETUP -#line 1028 "token.l" +#line 1028 "bas_token.l" { if (cur) { @@ -3377,7 +3377,7 @@ YY_RULE_SETUP YY_BREAK case 168: YY_RULE_SETUP -#line 1035 "token.l" +#line 1035 "bas_token.l" { if (cur) { @@ -3388,27 +3388,27 @@ YY_RULE_SETUP YY_BREAK case 169: YY_RULE_SETUP -#line 1042 "token.l" +#line 1042 "bas_token.l" return T_THEN; YY_BREAK case 170: YY_RULE_SETUP -#line 1043 "token.l" +#line 1043 "bas_token.l" return T_TAB; YY_BREAK case 171: YY_RULE_SETUP -#line 1044 "token.l" +#line 1044 "bas_token.l" return T_TO; YY_BREAK case 172: YY_RULE_SETUP -#line 1045 "token.l" +#line 1045 "bas_token.l" return T_TRN; YY_BREAK case 173: YY_RULE_SETUP -#line 1046 "token.l" +#line 1046 "bas_token.l" { if (cur) { @@ -3419,7 +3419,7 @@ YY_RULE_SETUP YY_BREAK case 174: YY_RULE_SETUP -#line 1053 "token.l" +#line 1053 "bas_token.l" { if (cur) { @@ -3430,7 +3430,7 @@ YY_RULE_SETUP YY_BREAK case 175: YY_RULE_SETUP -#line 1060 "token.l" +#line 1060 "bas_token.l" { if (cur) { @@ -3441,7 +3441,7 @@ YY_RULE_SETUP YY_BREAK case 176: YY_RULE_SETUP -#line 1067 "token.l" +#line 1067 "bas_token.l" { if (cur) { @@ -3452,7 +3452,7 @@ YY_RULE_SETUP YY_BREAK case 177: YY_RULE_SETUP -#line 1074 "token.l" +#line 1074 "bas_token.l" { if (cur) { @@ -3463,7 +3463,7 @@ YY_RULE_SETUP YY_BREAK case 178: YY_RULE_SETUP -#line 1081 "token.l" +#line 1081 "bas_token.l" { if (cur) { @@ -3474,12 +3474,12 @@ YY_RULE_SETUP YY_BREAK case 179: YY_RULE_SETUP -#line 1088 "token.l" +#line 1088 "bas_token.l" return T_USING; YY_BREAK case 180: YY_RULE_SETUP -#line 1089 "token.l" +#line 1089 "bas_token.l" { if (cur) { @@ -3490,7 +3490,7 @@ YY_RULE_SETUP YY_BREAK case 181: YY_RULE_SETUP -#line 1096 "token.l" +#line 1096 "bas_token.l" { if (cur) { @@ -3502,7 +3502,7 @@ YY_RULE_SETUP YY_BREAK case 182: YY_RULE_SETUP -#line 1104 "token.l" +#line 1104 "bas_token.l" { if (cur) { @@ -3514,7 +3514,7 @@ YY_RULE_SETUP YY_BREAK case 183: YY_RULE_SETUP -#line 1112 "token.l" +#line 1112 "bas_token.l" { if (cur) { @@ -3528,7 +3528,7 @@ case 184: (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 1119 "token.l" +#line 1119 "bas_token.l" { if (cur) { @@ -3539,7 +3539,7 @@ YY_RULE_SETUP YY_BREAK case 185: YY_RULE_SETUP -#line 1126 "token.l" +#line 1126 "bas_token.l" { if (cur) { @@ -3553,7 +3553,7 @@ case 186: (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 1133 "token.l" +#line 1133 "bas_token.l" { if (cur) { @@ -3564,12 +3564,12 @@ YY_RULE_SETUP YY_BREAK case 187: YY_RULE_SETUP -#line 1140 "token.l" +#line 1140 "bas_token.l" return T_XOR; YY_BREAK case 188: YY_RULE_SETUP -#line 1141 "token.l" +#line 1141 "bas_token.l" { if (cur) { @@ -3580,12 +3580,12 @@ YY_RULE_SETUP YY_BREAK case 189: YY_RULE_SETUP -#line 1148 "token.l" +#line 1148 "bas_token.l" return T_ZER; YY_BREAK case 190: YY_RULE_SETUP -#line 1149 "token.l" +#line 1149 "bas_token.l" { if (cur) { @@ -3596,7 +3596,7 @@ YY_RULE_SETUP YY_BREAK case 191: YY_RULE_SETUP -#line 1156 "token.l" +#line 1156 "bas_token.l" { if (cur) { @@ -3608,7 +3608,7 @@ YY_RULE_SETUP YY_BREAK case 192: YY_RULE_SETUP -#line 1164 "token.l" +#line 1164 "bas_token.l" { if (cur) { @@ -3619,7 +3619,7 @@ YY_RULE_SETUP YY_BREAK case 193: YY_RULE_SETUP -#line 1171 "token.l" +#line 1171 "bas_token.l" { if (cur) { @@ -3631,7 +3631,7 @@ YY_RULE_SETUP YY_BREAK case 194: YY_RULE_SETUP -#line 1179 "token.l" +#line 1179 "bas_token.l" { if (cur) { @@ -3642,7 +3642,7 @@ YY_RULE_SETUP YY_BREAK case 195: YY_RULE_SETUP -#line 1186 "token.l" +#line 1186 "bas_token.l" { if (cur) { @@ -3686,12 +3686,12 @@ YY_RULE_SETUP case 196: /* rule 196 can match eol */ YY_RULE_SETUP -#line 1225 "token.l" +#line 1225 "bas_token.l" YY_BREAK case 197: YY_RULE_SETUP -#line 1226 "token.l" +#line 1226 "bas_token.l" { if (cur) cur->u.junk=yytext[0]; return T_JUNK; @@ -3700,7 +3700,7 @@ YY_RULE_SETUP /*}}}*/ case 198: YY_RULE_SETUP -#line 1231 "token.l" +#line 1231 "bas_token.l" ECHO; YY_BREAK #line 3711 "" @@ -4574,7 +4574,7 @@ void yyset_debug (int bdebug ) static int yy_init_globals (void) { - /* Initialization is the same as for the non-reentrant scanner. + /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ @@ -4585,7 +4585,7 @@ static int yy_init_globals (void) (yy_init) = 0; (yy_start) = 0; -/* Defined in main.c */ + /* Defined in bas_main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; @@ -4670,7 +4670,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 1230 "token.l" +#line 1230 "bas_token.l" diff --git a/interpreters/bas/token.h b/interpreters/bas/bas_token.h similarity index 98% rename from interpreters/bas/token.h rename to interpreters/bas/bas_token.h index 3fcb5afd5..ed0af2b6b 100644 --- a/interpreters/bas/token.h +++ b/interpreters/bas/bas_token.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/token.h + * apps/interpreters/bas/bas_token.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,16 +56,16 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_TOKEN_H -#define __APPS_EXAMPLES_BAS_TOKEN_H +#ifndef __APPS_EXAMPLES_BAS_BAS_TOKEN_H +#define __APPS_EXAMPLES_BAS_BAS_TOKEN_H /**************************************************************************** * Included Files ****************************************************************************/ -#include "autotypes.h" -#include "value.h" -#include "var.h" +#include "bas_autotypes.h" +#include "bas_value.h" +#include "bas_var.h" /**************************************************************************** * Pre-processor Definitions @@ -126,8 +126,8 @@ struct Symbol struct Symbol *next; }; -#include "program.h" -#include "str.h" +#include "bas_program.h" +#include "bas_str.h" struct Identifier { @@ -543,4 +543,4 @@ struct String *Token_toString(struct Token *token, struct Token *spaceto, struct String *s, int *indent, int full); void Token_init(int backslash_colon, int uppercase); -#endif /* __APPS_EXAMPLES_BAS_TOKEN_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_TOKEN_H */ diff --git a/interpreters/bas/token.l b/interpreters/bas/bas_token.l similarity index 98% rename from interpreters/bas/token.l rename to interpreters/bas/bas_token.l index 351497948..d28267df6 100644 --- a/interpreters/bas/token.l +++ b/interpreters/bas/bas_token.l @@ -1,6 +1,5 @@ /* Tokens and token sequence arrays. */ %{ -/* #includes */ /*{{{C}}}*//*{{{*/ #include #include @@ -13,14 +12,9 @@ #include #include -#include "auto.h" -#include "token.h" -#include "statement.h" - -#ifdef DMALLOC -#include "dmalloc.h" -#endif -/*}}}*/ +#include "bas_auto.h" +#include "bas_token.h" +#include "bas_statement.h" static int g_matchdata; static int g_backslash_colon; @@ -28,7 +22,7 @@ static int g_uppercase; int yylex(void); static struct Token *g_cur; -static void string(const char *text) /*{{{*/ +static void string(const char *text) { if (g_cur) { @@ -49,8 +43,8 @@ static void string(const char *text) /*{{{*/ } } } -/*}}}*/ -static void string2(void) /*{{{*/ + +static void string2(void) { if (g_cur) { @@ -70,9 +64,9 @@ static void string2(void) /*{{{*/ } } } -/*}}}*/ + %} - /* flex options and definitions */ /*{{{*/ + /* flex options and definitions */ %option noyywrap %option nounput %x DATAINPUT ELSEIF IMAGEFMT @@ -99,9 +93,9 @@ ONERROR on[ \t]+error ONERROROFF on[ \t]+error[ \t]+off ONERRORGOTO0 on[ \t]+error[ \t]+goto[ \t]+0 SELECTCASE select[ \t]+case - /*}}}*/ + %% - /* flex rules */ /*{{{*/ + /* flex rules */ if (g_matchdata) BEGIN(DATAINPUT); "#" return T_CHANNEL; @@ -1228,12 +1222,12 @@ end[ \t]+function { if (g_cur) g_cur->u.junk=yytext[0]; return T_JUNK; } - /*}}}*/ + %% int g_token_property[T_LASTTOKEN]; -struct Token *Token_newCode(const char *ln) /*{{{*/ +struct Token *Token_newCode(const char *ln) { int l,lasttok,thistok,addNumber=0,sawif; struct Token *result; @@ -1241,7 +1235,7 @@ struct Token *Token_newCode(const char *ln) /*{{{*/ g_cur=(struct Token*)0; buf=yy_scan_string(ln); - /* determine number of tokens */ /*{{{*/ + /* determine number of tokens */ g_matchdata=sawif=0; for (lasttok=T_EOL,l=1; (thistok=yylex()); ++l) { @@ -1253,7 +1247,7 @@ struct Token *Token_newCode(const char *ln) /*{{{*/ lasttok=thistok; } if (l==1) { addNumber=1; ++l; } - /*}}}*/ + yy_delete_buffer(buf); g_cur=result=malloc(sizeof(struct Token)*l); if (addNumber) @@ -1295,8 +1289,8 @@ struct Token *Token_newCode(const char *ln) /*{{{*/ yy_delete_buffer(buf); return result; } -/*}}}*/ -struct Token *Token_newData(const char *ln) /*{{{*/ + +struct Token *Token_newData(const char *ln) { int l; struct Token *result; @@ -1316,8 +1310,8 @@ struct Token *Token_newData(const char *ln) /*{{{*/ yy_delete_buffer(buf); return result; } -/*}}}*/ -void Token_destroy(struct Token *token) /*{{{*/ + +void Token_destroy(struct Token *token) { struct Token *r=token; @@ -1506,8 +1500,8 @@ void Token_destroy(struct Token *token) /*{{{*/ } while ((r++)->type!=T_EOL); free(token); } -/*}}}*/ -struct String *Token_toString(struct Token *token, struct Token *spaceto, struct String *s, int *indent, int width) /*{{{*/ + +struct String *Token_toString(struct Token *token, struct Token *spaceto, struct String *s, int *indent, int width) { int ns=0,infn=0; int thisindent=0,thisnotindent=0,nextindent=0; @@ -1699,7 +1693,7 @@ struct String *Token_toString(struct Token *token, struct Token *spaceto, struct /* T_ZONE */ {"zone",1}, }; - /* precompute indentation */ /*{{{*/ + /* precompute indentation */ if (indent) thisindent=nextindent=*indent; t=token; do @@ -1825,7 +1819,7 @@ struct String *Token_toString(struct Token *token, struct Token *spaceto, struct default: break; } } while (t++->type!=T_EOL); - /*}}}*/ + if (width>=0) /* whole line */ { if (width) /* nicely formatted listing */ @@ -1876,7 +1870,7 @@ struct String *Token_toString(struct Token *token, struct Token *spaceto, struct } case T_REM: String_appendPrintf(s,"%s%s",g_uppercase?"REM":"rem",token->u.rem); break; case T_QUOTE: String_appendPrintf(s,"'%s",token->u.rem); break; - case T_STRING: /*{{{*/ + case T_STRING: { size_t l=token->u.string->length; char *data=token->u.string->character; @@ -1891,7 +1885,7 @@ struct String *Token_toString(struct Token *token, struct Token *spaceto, struct String_appendPrintf(s,"\""); break; } - /*}}}*/ + default: { if (g_uppercase) @@ -1913,8 +1907,8 @@ struct String *Token_toString(struct Token *token, struct Token *spaceto, struct if (spaceto && s->length>oldlength) memset(s->character+oldlength,' ',s->length-oldlength); return s; } -/*}}}*/ -void Token_init(int b_c, int uc) /*{{{*/ + +void Token_init(int b_c, int uc) { #define PROPERTY(t,assoc,unary_priority,binary_priority,is_unary,is_binary) \ g_token_property[t]=(assoc<<8)|(unary_priority<<5)|(binary_priority<<2)|(is_unary<<1)|is_binary @@ -1941,4 +1935,4 @@ void Token_init(int b_c, int uc) /*{{{*/ PROPERTY(T_EQV, 0,0,0,0,1); PROPERTY(T_IMP, 0,0,0,0,1); } -/*}}}*/ + diff --git a/interpreters/bas/value.c b/interpreters/bas/bas_value.c similarity index 99% rename from interpreters/bas/value.c rename to interpreters/bas/bas_value.c index db2ed1130..24b6e166f 100644 --- a/interpreters/bas/value.c +++ b/interpreters/bas/bas_value.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/value.c + * apps/interpreters/bas/bas_value.c * * Copyright (c) 1999-2014 Michael Haardt * @@ -73,8 +73,8 @@ #include #include -#include "error.h" -#include "value.h" +#include "bas_error.h" +#include "bas_value.h" /**************************************************************************** * Pre-processor Definitions diff --git a/interpreters/bas/value.h b/interpreters/bas/bas_value.h similarity index 97% rename from interpreters/bas/value.h rename to interpreters/bas/bas_value.h index 56e62a01e..d38eab94c 100644 --- a/interpreters/bas/value.h +++ b/interpreters/bas/bas_value.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/value.h + * apps/interpreters/bas/bas_value.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,14 +56,14 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_VALUE_H -#define __APPS_EXAMPLES_BAS_VALUE_H +#ifndef __APPS_EXAMPLES_BAS_BAS_VALUE_H +#define __APPS_EXAMPLES_BAS_BAS_VALUE_H /**************************************************************************** * Included Files ****************************************************************************/ -#include "str.h" +#include "bas_str.h" /**************************************************************************** * Pre-processor Definitions @@ -179,4 +179,4 @@ struct Value *Value_toStringUsing(struct Value *this, struct String *s, struct String *Value_toWrite(struct Value *this, struct String *s); struct Value *Value_nullValue(enum ValueType type); -#endif /* __APPS_EXAMPLES_BAS_VALUE_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_VALUE_H */ diff --git a/interpreters/bas/var.c b/interpreters/bas/bas_var.c similarity index 99% rename from interpreters/bas/var.c rename to interpreters/bas/bas_var.c index f0fb934b9..be7562aa1 100644 --- a/interpreters/bas/var.c +++ b/interpreters/bas/bas_var.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/var.c + * apps/interpreters/bas/bas_var.c * * Copyright (c) 1999-2014 Michael Haardt * @@ -66,8 +66,8 @@ #include #include -#include "error.h" -#include "var.h" +#include "bas_error.h" +#include "bas_var.h" /**************************************************************************** * Pre-processor Definitions diff --git a/interpreters/bas/var.h b/interpreters/bas/bas_var.h similarity index 96% rename from interpreters/bas/var.h rename to interpreters/bas/bas_var.h index afec8ba95..b7c6c3669 100644 --- a/interpreters/bas/var.h +++ b/interpreters/bas/bas_var.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/var.h + * apps/interpreters/bas/bas_var.h * * Copyright (c) 1999-2014 Michael Haardt * @@ -56,14 +56,14 @@ * ****************************************************************************/ -#ifndef __APPS_EXAMPLES_BAS_VAR_H -#define __APPS_EXAMPLES_BAS_VAR_H +#ifndef __APPS_EXAMPLES_BAS_BAS_VAR_H +#define __APPS_EXAMPLES_BAS_BAS_VAR_H /**************************************************************************** * Included Files ****************************************************************************/ -#include "value.h" +#include "bas_value.h" /**************************************************************************** * Pre-processor Definitions @@ -112,4 +112,4 @@ struct Value *Var_mat_redim(struct Var *this, unsigned int dim, const unsigned int *geometry, struct Value *err); -#endif /* __APPS_EXAMPLES_BAS_VAR_H */ +#endif /* __APPS_EXAMPLES_BAS_BAS_VAR_H */ diff --git a/interpreters/bas/vt100.c b/interpreters/bas/bas_vt100.c similarity index 99% rename from interpreters/bas/vt100.c rename to interpreters/bas/bas_vt100.c index ec151e2d9..1cad41e1b 100644 --- a/interpreters/bas/vt100.c +++ b/interpreters/bas/bas_vt100.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/vt100.c + * apps/interpreters/bas/bas_vt100.c * * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -44,7 +44,8 @@ #include -#include "fs.h" +#include "bas_fs.h" +#include "bas_vt100.h" /**************************************************************************** * Pre-processor Definitions diff --git a/interpreters/bas/vt100.h b/interpreters/bas/bas_vt100.h similarity index 97% rename from interpreters/bas/vt100.h rename to interpreters/bas/bas_vt100.h index 563b96b14..fc9560395 100644 --- a/interpreters/bas/vt100.h +++ b/interpreters/bas/bas_vt100.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/interpreters/bas/vt100.h + * apps/interpreters/bas/bas_vt100.h * * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __APPS_INTERPRETERS_BAS_VT100_H -#define __APPS_INTERPRETERS_BAS_VT100_H +#ifndef __APPS_INTERPRETERS_BAS_BAS_VT100_H +#define __APPS_INTERPRETERS_BAS_BAS_VT100_H /**************************************************************************** * Included Files @@ -232,4 +232,4 @@ void vt100_background_color(int chn, uint8_t color); } #endif -#endif /* __APPS_INTERPRETERS_BAS_VT100_H */ +#endif /* __APPS_INTERPRETERS_BAS_BAS_VT100_H */