Commit 838fb9e2 authored by sof's avatar sof
Browse files

[project @ 1998-11-08 17:06:13 by sof]

front end support for 'foreign label's
parent afd0d0bc
......@@ -401,6 +401,7 @@ NL [\n\r]
<GlaExt>"_casm_GC_" { RETURN(CASM_GC); }
<GlaExt>"foreign" { RETURN(FOREIGN); }
<GlaExt>"export" { RETURN(EXPORT); }
<GlaExt>"label" { RETURN(LABEL); }
<GlaExt>"unsafe" { RETURN(UNSAFE); }
<GlaExt>"_stdcall" { RETURN(STDCALL); }
<GlaExt>"_ccall" { RETURN(C_CALL); }
......
......@@ -161,7 +161,7 @@ BOOLEAN pat_check=TRUE;
%token SCC
%token CCALL CCALL_GC CASM CASM_GC
%token EXPORT UNSAFE STDCALL C_CALL
%token EXPORT UNSAFE STDCALL C_CALL LABEL
%token PASCAL FASTCALL FOREIGN DYNAMIC
/**********************************************************************
......@@ -548,6 +548,8 @@ defaultd: defaultkey OPAREN types CPAREN { $$ = mkdbind($3,startlineno);
foreignd: foreignkey IMPORT callconv ext_name unsafe_flag qvarid DCOLON sigtype { $$ = mkfobind($6,$8,$4,$5,$3,FOREIGN_IMPORT,startlineno); }
| foreignkey EXPORT callconv ext_name qvarid DCOLON sigtype { $$ = mkfobind($5,$7,$4,0,$3,FOREIGN_EXPORT,startlineno); }
;
| foreignkey LABEL ext_name qvarid DCOLON sigtype { $$ = mkfobind($4,$6,$3,0,-1,FOREIGN_LABEL,startlineno); }
;
callconv: STDCALL { $$ = CALLCONV_STDCALL; }
| C_CALL { $$ = CALLCONV_CCALL; }
......
......@@ -122,6 +122,7 @@ void checkprec PROTO((tree, qid, BOOLEAN));
#define FOREIGN_IMPORT 0
#define FOREIGN_EXPORT 1
#define FOREIGN_LABEL 2
BOOLEAN isconstr PROTO((char *));
void setstartlineno PROTO((void));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment