"for example" is more appropriate than "that is"

This commit is contained in:
Bill Currie 2002-09-16 15:42:11 +00:00
parent 3b09f34532
commit 412db7e27d
7 changed files with 14 additions and 2 deletions

2
NEWS
View File

@ -17,7 +17,7 @@ Changes from 0.3.0
* Object-oriented runtime system, in the style of Objective-C.
* Runtime fixups of built-in functions whose builtin number is
zero. If a built-in function is available to the engine, with
the same name given in the source code (i.e.
the same name given in the source code (e.g.
"void (void) coredump = #0;"), the engine will set the value
to the actual number used by the engine.
* Debugging support (needs compiler support, which qfcc

View File

@ -52,6 +52,7 @@ typedef struct def_s {
unsigned global:1; // globally declared def
unsigned external:1; // externally declared def
unsigned local:1; // function local def
unsigned system:1; // system def
string_t file; // source file
int line; // source line
@ -98,6 +99,7 @@ typedef struct scope_s {
typedef enum {
st_none,
st_global,
st_system,
st_extern,
st_static,
st_local

View File

@ -75,6 +75,7 @@ typedef struct qfo_def_s {
#define QFOD_GLOBAL (1u<<3)
#define QFOD_EXTERNAL (1u<<4)
#define QFOD_LOCAL (1u<<5)
#define QFOD_SYSTEM (1u<<6)
typedef struct qfo_func_s {
string_t name;

View File

@ -151,6 +151,9 @@ set_storage_bits (def_t *def, storage_class_t storage)
switch (storage) {
case st_none:
break;
case st_system:
def->system = 1;
// fall through
case st_global:
def->global = 1;
def->external = 0;
@ -240,6 +243,7 @@ get_def (type_t *type, const char *name, scope_t *scope,
case st_none:
case st_global:
case st_local:
case st_system:
space = scope->space;
break;
case st_extern:

View File

@ -134,6 +134,8 @@ flags (def_t *d)
flags |= QFOD_EXTERNAL;
if (d->local)
flags |= QFOD_LOCAL;
if (d->system)
flags |= QFOD_SYSTEM;
return flags;
}
@ -538,6 +540,7 @@ qfo_to_progs (qfo_t *qfo, pr_info_t *pr)
pd->global = (qd->flags & QFOD_GLOBAL) != 0;
pd->external = (qd->flags & QFOD_EXTERNAL) != 0;
pd->local = (qd->flags & QFOD_LOCAL) != 0;
pd->system = (qd->flags & QFOD_SYSTEM) != 0;
pd->file = qd->file;
pd->line = qd->line;
}

View File

@ -301,6 +301,7 @@ static keyword_t keywords[] = {
{"@argv", ARGV, 0, 0, PROG_VERSION},
{"@extern", EXTERN, 0, 1, PROG_ID_VERSION},
{"@static", STATIC, 0, 1, PROG_ID_VERSION},
{"@system", SYSTEM, 0, 1, PROG_ID_VERSION},
{"@sizeof", SIZEOF, 0, 0, PROG_VERSION},
};

View File

@ -128,7 +128,7 @@ void free_local_inits (hashtab_t *def_list);
%token LOCAL RETURN WHILE DO IF ELSE FOR BREAK CONTINUE ELLIPSIS NIL
%token IFBE IFB IFAE IFA
%token SWITCH CASE DEFAULT STRUCT UNION ENUM TYPEDEF SUPER SELF THIS
%token ARGC ARGV EXTERN STATIC SIZEOF
%token ARGC ARGV EXTERN STATIC SYSTEM SIZEOF
%token ELE_START
%token <type> TYPE
%token CLASS DEFS ENCODE END IMPLEMENTATION INTERFACE PRIVATE PROTECTED
@ -223,6 +223,7 @@ simple_def
storage_class
: EXTERN { current_storage = st_extern; }
| STATIC { current_storage = st_static; }
| SYSTEM { current_storage = st_system; }
;
struct_defs