Recovered from cvs revision 2007-06-26 11:03:00

This commit is contained in:
hyung-hwan 2007-06-28 00:27:00 +00:00
parent d9bd6587a4
commit e4fcbe9db9
6 changed files with 306 additions and 144 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.cpp,v 1.43 2007/06/23 17:17:03 bacon Exp $
* $Id: Awk.cpp,v 1.44 2007/06/25 14:01:10 bacon Exp $
*/
#include <ase/awk/Awk.hpp>
@ -396,7 +396,7 @@ namespace ASE
Awk::Awk (): awk (ASE_NULL), functionMap (ASE_NULL),
sourceIn (Source::READ), sourceOut (Source::WRITE),
errnum (E_NOERR), errlin (0), runCallback (false)
errnum (ERR_NOERR), errlin (0), runCallback (false)
{
this->errmsg[0] = ASE_T('\0');
@ -442,7 +442,7 @@ namespace ASE
void Awk::clearError ()
{
this->errnum = E_NOERR;
this->errnum = ERR_NOERR;
this->errlin = 0;
this->errmsg[0] = ASE_T('\0');
}
@ -498,7 +498,7 @@ namespace ASE
awk = ase_awk_open (&prmfns, this);
if (awk == ASE_NULL)
{
setError (E_NOMEM);
setError (ERR_NOMEM);
return -1;
}
@ -509,7 +509,7 @@ namespace ASE
ase_awk_close (awk);
awk = ASE_NULL;
setError (E_NOMEM);
setError (ERR_NOMEM);
return -1;
}
@ -640,7 +640,7 @@ namespace ASE
if (runarg == ASE_NULL)
{
setError (E_NOMEM);
setError (ERR_NOMEM);
return -1;
}
@ -658,7 +658,7 @@ namespace ASE
}
}
setError (E_NOMEM);
setError (ERR_NOMEM);
return -1;
}
}
@ -740,7 +740,7 @@ namespace ASE
ase_awk_malloc (awk, ASE_SIZEOF(handler));
if (tmp == ASE_NULL)
{
setError (E_NOMEM);
setError (ERR_NOMEM);
return -1;
}
@ -765,7 +765,7 @@ namespace ASE
ase_awk_delbfn (awk, name, nameLen);
ase_awk_free (awk, tmp);
setError (E_NOMEM);
setError (ERR_NOMEM);
return -1;
}
@ -968,7 +968,7 @@ namespace ASE
{
Run* r = (Run*)custom;
if (errnum == E_NOERR && r->callbackFailed)
if (errnum == ERR_NOERR && r->callbackFailed)
{
ase_awk_setrunerror (
r->run, ASE_AWK_ENOMEM, 0, ASE_NULL, 0);

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.hpp,v 1.41 2007/06/23 17:17:03 bacon Exp $
* $Id: Awk.hpp,v 1.42 2007/06/25 14:01:10 bacon Exp $
*/
#ifndef _ASE_AWK_AWK_HPP_
@ -208,134 +208,134 @@ namespace ASE
// generated by generrcode.awk
enum ErrorCode
{
E_NOERR = ASE_AWK_ENOERR,
E_INVAL = ASE_AWK_EINVAL,
E_NOMEM = ASE_AWK_ENOMEM,
E_NOSUP = ASE_AWK_ENOSUP,
E_NOPER = ASE_AWK_ENOPER,
E_NODEV = ASE_AWK_ENODEV,
E_NOSPC = ASE_AWK_ENOSPC,
E_MFILE = ASE_AWK_EMFILE,
E_MLINK = ASE_AWK_EMLINK,
E_AGAIN = ASE_AWK_EAGAIN,
E_NOENT = ASE_AWK_ENOENT,
E_EXIST = ASE_AWK_EEXIST,
E_FTBIG = ASE_AWK_EFTBIG,
E_TBUSY = ASE_AWK_ETBUSY,
E_ISDIR = ASE_AWK_EISDIR,
E_IOERR = ASE_AWK_EIOERR,
E_OPEN = ASE_AWK_EOPEN,
E_READ = ASE_AWK_EREAD,
E_WRITE = ASE_AWK_EWRITE,
E_CLOSE = ASE_AWK_ECLOSE,
E_INTERN = ASE_AWK_EINTERN,
E_RUNTIME = ASE_AWK_ERUNTIME,
E_BLKNST = ASE_AWK_EBLKNST,
E_EXPRNST = ASE_AWK_EEXPRNST,
E_SINOP = ASE_AWK_ESINOP,
E_SINCL = ASE_AWK_ESINCL,
E_SINRD = ASE_AWK_ESINRD,
E_SOUTOP = ASE_AWK_ESOUTOP,
E_SOUTCL = ASE_AWK_ESOUTCL,
E_SOUTWR = ASE_AWK_ESOUTWR,
E_LXCHR = ASE_AWK_ELXCHR,
E_LXUNG = ASE_AWK_ELXUNG,
E_ENDSRC = ASE_AWK_EENDSRC,
E_ENDCMT = ASE_AWK_EENDCMT,
E_ENDSTR = ASE_AWK_EENDSTR,
E_ENDREX = ASE_AWK_EENDREX,
E_LBRACE = ASE_AWK_ELBRACE,
E_LPAREN = ASE_AWK_ELPAREN,
E_RPAREN = ASE_AWK_ERPAREN,
E_RBRACK = ASE_AWK_ERBRACK,
E_COMMA = ASE_AWK_ECOMMA,
E_SCOLON = ASE_AWK_ESCOLON,
E_COLON = ASE_AWK_ECOLON,
E_STMEND = ASE_AWK_ESTMEND,
E_IN = ASE_AWK_EIN,
E_NOTVAR = ASE_AWK_ENOTVAR,
E_EXPRES = ASE_AWK_EEXPRES,
E_WHILE = ASE_AWK_EWHILE,
E_ASSIGN = ASE_AWK_EASSIGN,
E_IDENT = ASE_AWK_EIDENT,
E_FNNAME = ASE_AWK_EFNNAME,
E_BLKBEG = ASE_AWK_EBLKBEG,
E_BLKEND = ASE_AWK_EBLKEND,
E_DUPBEG = ASE_AWK_EDUPBEG,
E_DUPEND = ASE_AWK_EDUPEND,
E_BFNRED = ASE_AWK_EBFNRED,
E_AFNRED = ASE_AWK_EAFNRED,
E_GBLRED = ASE_AWK_EGBLRED,
E_PARRED = ASE_AWK_EPARRED,
E_DUPPAR = ASE_AWK_EDUPPAR,
E_DUPGBL = ASE_AWK_EDUPGBL,
E_DUPLCL = ASE_AWK_EDUPLCL,
E_BADPAR = ASE_AWK_EBADPAR,
E_BADVAR = ASE_AWK_EBADVAR,
E_UNDEF = ASE_AWK_EUNDEF,
E_LVALUE = ASE_AWK_ELVALUE,
E_GBLTM = ASE_AWK_EGBLTM,
E_LCLTM = ASE_AWK_ELCLTM,
E_PARTM = ASE_AWK_EPARTM,
E_DELETE = ASE_AWK_EDELETE,
E_BREAK = ASE_AWK_EBREAK,
E_CONTINUE = ASE_AWK_ECONTINUE,
E_NEXTBEG = ASE_AWK_ENEXTBEG,
E_NEXTEND = ASE_AWK_ENEXTEND,
E_NEXTFBEG = ASE_AWK_ENEXTFBEG,
E_NEXTFEND = ASE_AWK_ENEXTFEND,
E_PRINTFARG = ASE_AWK_EPRINTFARG,
E_PREPST = ASE_AWK_EPREPST,
E_GLNCPS = ASE_AWK_EGLNCPS,
E_DIVBY0 = ASE_AWK_EDIVBY0,
E_OPERAND = ASE_AWK_EOPERAND,
E_POSIDX = ASE_AWK_EPOSIDX,
E_ARGTF = ASE_AWK_EARGTF,
E_ARGTM = ASE_AWK_EARGTM,
E_FNNONE = ASE_AWK_EFNNONE,
E_NOTIDX = ASE_AWK_ENOTIDX,
E_NOTDEL = ASE_AWK_ENOTDEL,
E_NOTMAP = ASE_AWK_ENOTMAP,
E_NOTMAPIN = ASE_AWK_ENOTMAPIN,
E_NOTMAPNILIN = ASE_AWK_ENOTMAPNILIN,
E_NOTREF = ASE_AWK_ENOTREF,
E_NOTASS = ASE_AWK_ENOTASS,
E_IDXVALASSMAP = ASE_AWK_EIDXVALASSMAP,
E_POSVALASSMAP = ASE_AWK_EPOSVALASSMAP,
E_MAPTOSCALAR = ASE_AWK_EMAPTOSCALAR,
E_SCALARTOMAP = ASE_AWK_ESCALARTOMAP,
E_MAPNOTALLOWED = ASE_AWK_EMAPNOTALLOWED,
E_VALTYPE = ASE_AWK_EVALTYPE,
E_RDELETE = ASE_AWK_ERDELETE,
E_RNEXTBEG = ASE_AWK_ERNEXTBEG,
E_RNEXTEND = ASE_AWK_ERNEXTEND,
E_RNEXTFBEG = ASE_AWK_ERNEXTFBEG,
E_RNEXTFEND = ASE_AWK_ERNEXTFEND,
E_BFNUSER = ASE_AWK_EBFNUSER,
E_BFNIMPL = ASE_AWK_EBFNIMPL,
E_IOUSER = ASE_AWK_EIOUSER,
E_IONONE = ASE_AWK_EIONONE,
E_IOIMPL = ASE_AWK_EIOIMPL,
E_IONMEM = ASE_AWK_EIONMEM,
E_IONMNL = ASE_AWK_EIONMNL,
E_FMTARG = ASE_AWK_EFMTARG,
E_FMTCNV = ASE_AWK_EFMTCNV,
E_CONVFMTCHR = ASE_AWK_ECONVFMTCHR,
E_OFMTCHR = ASE_AWK_EOFMTCHR,
E_REXRECUR = ASE_AWK_EREXRECUR,
E_REXRPAREN = ASE_AWK_EREXRPAREN,
E_REXRBRACKET = ASE_AWK_EREXRBRACKET,
E_REXRBRACE = ASE_AWK_EREXRBRACE,
E_REXUNBALPAR = ASE_AWK_EREXUNBALPAR,
E_REXCOLON = ASE_AWK_EREXCOLON,
E_REXCRANGE = ASE_AWK_EREXCRANGE,
E_REXCCLASS = ASE_AWK_EREXCCLASS,
E_REXBRANGE = ASE_AWK_EREXBRANGE,
E_REXEND = ASE_AWK_EREXEND,
E_REXGARBAGE = ASE_AWK_EREXGARBAGE
ERR_NOERR = ASE_AWK_ENOERR,
ERR_INVAL = ASE_AWK_EINVAL,
ERR_NOMEM = ASE_AWK_ENOMEM,
ERR_NOSUP = ASE_AWK_ENOSUP,
ERR_NOPER = ASE_AWK_ENOPER,
ERR_NODEV = ASE_AWK_ENODEV,
ERR_NOSPC = ASE_AWK_ENOSPC,
ERR_MFILE = ASE_AWK_EMFILE,
ERR_MLINK = ASE_AWK_EMLINK,
ERR_AGAIN = ASE_AWK_EAGAIN,
ERR_NOENT = ASE_AWK_ENOENT,
ERR_EXIST = ASE_AWK_EEXIST,
ERR_FTBIG = ASE_AWK_EFTBIG,
ERR_TBUSY = ASE_AWK_ETBUSY,
ERR_ISDIR = ASE_AWK_EISDIR,
ERR_IOERR = ASE_AWK_EIOERR,
ERR_OPEN = ASE_AWK_EOPEN,
ERR_READ = ASE_AWK_EREAD,
ERR_WRITE = ASE_AWK_EWRITE,
ERR_CLOSE = ASE_AWK_ECLOSE,
ERR_INTERN = ASE_AWK_EINTERN,
ERR_RUNTIME = ASE_AWK_ERUNTIME,
ERR_BLKNST = ASE_AWK_EBLKNST,
ERR_EXPRNST = ASE_AWK_EEXPRNST,
ERR_SINOP = ASE_AWK_ESINOP,
ERR_SINCL = ASE_AWK_ESINCL,
ERR_SINRD = ASE_AWK_ESINRD,
ERR_SOUTOP = ASE_AWK_ESOUTOP,
ERR_SOUTCL = ASE_AWK_ESOUTCL,
ERR_SOUTWR = ASE_AWK_ESOUTWR,
ERR_LXCHR = ASE_AWK_ELXCHR,
ERR_LXUNG = ASE_AWK_ELXUNG,
ERR_ENDSRC = ASE_AWK_EENDSRC,
ERR_ENDCMT = ASE_AWK_EENDCMT,
ERR_ENDSTR = ASE_AWK_EENDSTR,
ERR_ENDREX = ASE_AWK_EENDREX,
ERR_LBRACE = ASE_AWK_ELBRACE,
ERR_LPAREN = ASE_AWK_ELPAREN,
ERR_RPAREN = ASE_AWK_ERPAREN,
ERR_RBRACK = ASE_AWK_ERBRACK,
ERR_COMMA = ASE_AWK_ECOMMA,
ERR_SCOLON = ASE_AWK_ESCOLON,
ERR_COLON = ASE_AWK_ECOLON,
ERR_STMEND = ASE_AWK_ESTMEND,
ERR_IN = ASE_AWK_EIN,
ERR_NOTVAR = ASE_AWK_ENOTVAR,
ERR_EXPRES = ASE_AWK_EEXPRES,
ERR_WHILE = ASE_AWK_EWHILE,
ERR_ASSIGN = ASE_AWK_EASSIGN,
ERR_IDENT = ASE_AWK_EIDENT,
ERR_FNNAME = ASE_AWK_EFNNAME,
ERR_BLKBEG = ASE_AWK_EBLKBEG,
ERR_BLKEND = ASE_AWK_EBLKEND,
ERR_DUPBEG = ASE_AWK_EDUPBEG,
ERR_DUPEND = ASE_AWK_EDUPEND,
ERR_BFNRED = ASE_AWK_EBFNRED,
ERR_AFNRED = ASE_AWK_EAFNRED,
ERR_GBLRED = ASE_AWK_EGBLRED,
ERR_PARRED = ASE_AWK_EPARRED,
ERR_DUPPAR = ASE_AWK_EDUPPAR,
ERR_DUPGBL = ASE_AWK_EDUPGBL,
ERR_DUPLCL = ASE_AWK_EDUPLCL,
ERR_BADPAR = ASE_AWK_EBADPAR,
ERR_BADVAR = ASE_AWK_EBADVAR,
ERR_UNDEF = ASE_AWK_EUNDEF,
ERR_LVALUE = ASE_AWK_ELVALUE,
ERR_GBLTM = ASE_AWK_EGBLTM,
ERR_LCLTM = ASE_AWK_ELCLTM,
ERR_PARTM = ASE_AWK_EPARTM,
ERR_DELETE = ASE_AWK_EDELETE,
ERR_BREAK = ASE_AWK_EBREAK,
ERR_CONTINUE = ASE_AWK_ECONTINUE,
ERR_NEXTBEG = ASE_AWK_ENEXTBEG,
ERR_NEXTEND = ASE_AWK_ENEXTEND,
ERR_NEXTFBEG = ASE_AWK_ENEXTFBEG,
ERR_NEXTFEND = ASE_AWK_ENEXTFEND,
ERR_PRINTFARG = ASE_AWK_EPRINTFARG,
ERR_PREPST = ASE_AWK_EPREPST,
ERR_GLNCPS = ASE_AWK_EGLNCPS,
ERR_DIVBY0 = ASE_AWK_EDIVBY0,
ERR_OPERAND = ASE_AWK_EOPERAND,
ERR_POSIDX = ASE_AWK_EPOSIDX,
ERR_ARGTF = ASE_AWK_EARGTF,
ERR_ARGTM = ASE_AWK_EARGTM,
ERR_FNNONE = ASE_AWK_EFNNONE,
ERR_NOTIDX = ASE_AWK_ENOTIDX,
ERR_NOTDEL = ASE_AWK_ENOTDEL,
ERR_NOTMAP = ASE_AWK_ENOTMAP,
ERR_NOTMAPIN = ASE_AWK_ENOTMAPIN,
ERR_NOTMAPNILIN = ASE_AWK_ENOTMAPNILIN,
ERR_NOTREF = ASE_AWK_ENOTREF,
ERR_NOTASS = ASE_AWK_ENOTASS,
ERR_IDXVALASSMAP = ASE_AWK_EIDXVALASSMAP,
ERR_POSVALASSMAP = ASE_AWK_EPOSVALASSMAP,
ERR_MAPTOSCALAR = ASE_AWK_EMAPTOSCALAR,
ERR_SCALARTOMAP = ASE_AWK_ESCALARTOMAP,
ERR_MAPNOTALLOWED = ASE_AWK_EMAPNOTALLOWED,
ERR_VALTYPE = ASE_AWK_EVALTYPE,
ERR_RDELETE = ASE_AWK_ERDELETE,
ERR_RNEXTBEG = ASE_AWK_ERNEXTBEG,
ERR_RNEXTEND = ASE_AWK_ERNEXTEND,
ERR_RNEXTFBEG = ASE_AWK_ERNEXTFBEG,
ERR_RNEXTFEND = ASE_AWK_ERNEXTFEND,
ERR_BFNUSER = ASE_AWK_EBFNUSER,
ERR_BFNIMPL = ASE_AWK_EBFNIMPL,
ERR_IOUSER = ASE_AWK_EIOUSER,
ERR_IONONE = ASE_AWK_EIONONE,
ERR_IOIMPL = ASE_AWK_EIOIMPL,
ERR_IONMEM = ASE_AWK_EIONMEM,
ERR_IONMNL = ASE_AWK_EIONMNL,
ERR_FMTARG = ASE_AWK_EFMTARG,
ERR_FMTCNV = ASE_AWK_EFMTCNV,
ERR_CONVFMTCHR = ASE_AWK_ECONVFMTCHR,
ERR_OFMTCHR = ASE_AWK_EOFMTCHR,
ERR_REXRECUR = ASE_AWK_EREXRECUR,
ERR_REXRPAREN = ASE_AWK_EREXRPAREN,
ERR_REXRBRACKET = ASE_AWK_EREXRBRACKET,
ERR_REXRBRACE = ASE_AWK_EREXRBRACE,
ERR_REXUNBALPAR = ASE_AWK_EREXUNBALPAR,
ERR_REXCOLON = ASE_AWK_EREXCOLON,
ERR_REXCRANGE = ASE_AWK_EREXCRANGE,
ERR_REXCCLASS = ASE_AWK_EREXCCLASS,
ERR_REXBRANGE = ASE_AWK_EREXBRANGE,
ERR_REXEND = ASE_AWK_EREXEND,
ERR_REXGARBAGE = ASE_AWK_EREXGARBAGE,
};
// end of enum ErrorCode
// generated by genoptcode.awk
enum Option
{

View File

@ -1,5 +1,5 @@
/*
* $Id: Exception.java,v 1.3 2007/04/30 05:47:33 bacon Exp $
* $Id: Exception.java,v 1.4 2007/06/25 14:13:23 bacon Exp $
*
* {License}
*/
@ -11,17 +11,145 @@ public class Exception extends java.lang.Exception
private int code;
private int line;
// generated by generrcode-java.awk
public static final int NOERR = 0;
public static final int INVAL = 1;
public static final int NOMEM = 2;
public static final int NOSUP = 3;
public static final int NOPER = 4;
public static final int NODEV = 5;
public static final int NOSPC = 6;
public static final int MFILE = 7;
public static final int MLINK = 8;
public static final int AGAIN = 9;
public static final int NOENT = 10;
public static final int EXIST = 11;
public static final int FTBIG = 12;
public static final int TBUSY = 13;
public static final int ISDIR = 14;
public static final int IOERR = 15;
public static final int OPEN = 16;
public static final int READ = 17;
public static final int WRITE = 18;
public static final int CLOSE = 19;
public static final int INTERN = 20;
public static final int RUNTIME = 21;
public static final int BLKNST = 22;
public static final int EXPRNST = 23;
public static final int SINOP = 24;
public static final int SINCL = 25;
public static final int SINRD = 26;
public static final int SOUTOP = 27;
public static final int SOUTCL = 28;
public static final int SOUTWR = 29;
public static final int LXCHR = 30;
public static final int LXUNG = 31;
public static final int ENDSRC = 32;
public static final int ENDCMT = 33;
public static final int ENDSTR = 34;
public static final int ENDREX = 35;
public static final int LBRACE = 36;
public static final int LPAREN = 37;
public static final int RPAREN = 38;
public static final int RBRACK = 39;
public static final int COMMA = 40;
public static final int SCOLON = 41;
public static final int COLON = 42;
public static final int STMEND = 43;
public static final int IN = 44;
public static final int NOTVAR = 45;
public static final int EXPRES = 46;
public static final int WHILE = 47;
public static final int ASSIGN = 48;
public static final int IDENT = 49;
public static final int FNNAME = 50;
public static final int BLKBEG = 51;
public static final int BLKEND = 52;
public static final int DUPBEG = 53;
public static final int DUPEND = 54;
public static final int BFNRED = 55;
public static final int AFNRED = 56;
public static final int GBLRED = 57;
public static final int PARRED = 58;
public static final int DUPPAR = 59;
public static final int DUPGBL = 60;
public static final int DUPLCL = 61;
public static final int BADPAR = 62;
public static final int BADVAR = 63;
public static final int UNDEF = 64;
public static final int LVALUE = 65;
public static final int GBLTM = 66;
public static final int LCLTM = 67;
public static final int PARTM = 68;
public static final int DELETE = 69;
public static final int BREAK = 70;
public static final int CONTINUE = 71;
public static final int NEXTBEG = 72;
public static final int NEXTEND = 73;
public static final int NEXTFBEG = 74;
public static final int NEXTFEND = 75;
public static final int PRINTFARG = 76;
public static final int PREPST = 77;
public static final int GLNCPS = 78;
public static final int DIVBY0 = 79;
public static final int OPERAND = 80;
public static final int POSIDX = 81;
public static final int ARGTF = 82;
public static final int ARGTM = 83;
public static final int FNNONE = 84;
public static final int NOTIDX = 85;
public static final int NOTDEL = 86;
public static final int NOTMAP = 87;
public static final int NOTMAPIN = 88;
public static final int NOTMAPNILIN = 89;
public static final int NOTREF = 90;
public static final int NOTASS = 91;
public static final int IDXVALASSMAP = 92;
public static final int POSVALASSMAP = 93;
public static final int MAPTOSCALAR = 94;
public static final int SCALARTOMAP = 95;
public static final int MAPNOTALLOWED = 96;
public static final int VALTYPE = 97;
public static final int RDELETE = 98;
public static final int RNEXTBEG = 99;
public static final int RNEXTEND = 100;
public static final int RNEXTFBEG = 101;
public static final int RNEXTFEND = 102;
public static final int BFNUSER = 103;
public static final int BFNIMPL = 104;
public static final int IOUSER = 105;
public static final int IONONE = 106;
public static final int IOIMPL = 107;
public static final int IONMEM = 108;
public static final int IONMNL = 109;
public static final int FMTARG = 110;
public static final int FMTCNV = 111;
public static final int CONVFMTCHR = 112;
public static final int OFMTCHR = 113;
public static final int REXRECUR = 114;
public static final int REXRPAREN = 115;
public static final int REXRBRACKET = 116;
public static final int REXRBRACE = 117;
public static final int REXUNBALPAR = 118;
public static final int REXCOLON = 119;
public static final int REXCRANGE = 120;
public static final int REXCCLASS = 121;
public static final int REXBRANGE = 122;
public static final int REXEND = 123;
public static final int REXGARBAGE = 124;
// end of error codes
public Exception ()
{
super ();
this.code = 0;
this.code = NOERR;
this.line = 0;
}
public Exception (String msg)
{
super (msg);
this.code = 0;
this.code = NOERR;
this.line = 0;
}

View File

@ -0,0 +1,34 @@
#
# generrcode-java.awk
#
# aseawk -f generrcode-java.awk awk.h
#
BEGIN {
collect=0;
tab2="\t";
tab3="\t\t";
count=0;
}
/^[[:space:]]*enum[[:space:]]+ase_awk_errnum_t[[:space:]]*$/ {
collect=1;
print tab2 "// generated by generrcode-java.awk";
#print tab2 "enum ErrorCode";
#print tab2 "{";
}
collect && /^[[:space:]]*};[[:space:]]*$/ {
#print tab2 "};";
print tab2 "// end of error codes";
print "";
collect=0;
}
collect && /^[[:space:]]*ASE_AWK_E[[:alnum:]]+/ {
split ($1, flds, ",");
name=flds[1];
print tab2 "public static final int " substr (name,10,length(name)-9) " = " count++ ";";
}

View File

@ -1,7 +1,7 @@
#
# generrcode.awk
#
# aseawk -f generror.awk awk.h
# aseawk -f generrcode.awk awk.h
#
BEGIN {
@ -28,6 +28,6 @@ collect && /^[[:space:]]*ASE_AWK_E[[:alnum:]]+/ {
split ($1, flds, ",");
name=flds[1];
print tab4 "E_" substr (name,10,length(name)-9) " = " name ",";
print tab4 "ERR_" substr (name,10,length(name)-9) " = " name ",";
}

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.cpp,v 1.28 2007/06/21 13:59:24 bacon Exp $
* $Id: Awk.cpp,v 1.29 2007/06/25 14:01:28 bacon Exp $
*/
#include <ase/awk/StdAwk.hpp>
@ -136,7 +136,7 @@ protected:
{
ErrorCode err = run.getErrorCode();
if (err != E_NOERR)
if (err != ERR_NOERR)
{
ase_fprintf (stderr, ASE_T("cannot run: LINE[%d] %s\n"),
run.getErrorLine(), run.getErrorMessage());