mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-14 10:57:08 +03:00
0c96c62ef9
git-svn-id: svn://kolibrios.org@1848 a494cfbc-eb01-0410-851d-a64ba20cac60
110 lines
3.9 KiB
Plaintext
110 lines
3.9 KiB
Plaintext
//===== ƒ«®¡ «ìë¥ ª®áâ âë
|
||
#define STD_INPUT_HANDLE -10
|
||
#define STD_OUTPUT_HANDLE -11
|
||
#define STD_ERROR_HANDLE -12
|
||
#define CREATE_NEW 1
|
||
#define CREATE_ALWAYS 2
|
||
#define OPEN_EXISTING 3
|
||
#define OPEN_ALWAYS 4
|
||
#define TRUNCATE_EXISTING 5
|
||
// ----
|
||
#define GENERIC_READ 0x80000000
|
||
#define GENERIC_WRITE 0x40000000
|
||
#define GENERIC_EXECUTE 0x20000000
|
||
#define GENERIC_ALL 0x10000000
|
||
// ---- Š®áâ âë ª®¬¯¨«ïâ®à
|
||
#define _END 0x1B
|
||
#define FILENAMESIZE 80
|
||
#define IDLENGTH 65 // „«¨ ¨¬¥¨ ¨¤¥â¨ä¨ª â®à , ¢ª«îç ï NULL-â¥à¬¨ â®à
|
||
#define MAXDATA 512000 // <20> §¬¥à ¡ãä¥à®¢ ¯®¤ ª®¤ ¨ ¤ ë¥
|
||
#define MAXDBGS 50000 // <20> §¬¥à ¡ãä¥à®¢ ¯®¤ ®â« ¤®çã ¨ä®à¬ æ¨î
|
||
#define MAXDLLS 100
|
||
#define MAXINPUT 512000 // Œ ªá¨¬ «ìë à §¬¥à ¢å®¤®£® ä ©«
|
||
#define MAXMDL 100 // Œ ªá¨¬ «ì®¥ ç¨á«® includes
|
||
#define MAXPOSTS 150000 // <20> §¬¥à ¡ãä¥à®¢ ¯®¤ POST ®¡à ¡®âªã
|
||
#define NULL 0
|
||
#define SORTSIZE 20
|
||
#define STRLEN 1000 // „«¨ ¡ãä¥à ¯®¤ token
|
||
// ------------------------------------------
|
||
//===== <20>㬥஢ ë¥ ª®áâ âë
|
||
// ---- Š®¤ë ¢®§¢à â
|
||
enum{ e_ok, e_outofmemory, e_cannotopeninput, e_toomanyerrors,
|
||
e_internalerror, e_noinputspecified, e_unknowncommandline,
|
||
e_extract, e_cannotopenmapfile, e_someerrors };
|
||
// ---- Š®¤ë tokens tk_xxxx
|
||
enum{
|
||
tk_eof,tk_number,tk_string,tk_var,
|
||
tk_id,
|
||
tk_db,tk_dw,tk_dd,tk_dq, // ’¨¯ë ¯¥à¥¬¥ëå
|
||
tk_byte,tk_char,tk_word,tk_short,
|
||
tk_dword,tk_int,
|
||
tk_enum, // <20>㬥஢ ë¥ ª®áâ âë
|
||
tk_struc, // Ž¯à¥¤¥«¥¨¥ áâàãªâãàë
|
||
tk_if,tk_else,tk_endif, // “á«®¢ ï ª®¬¯¨«ïæ¨ï
|
||
tk_include,tk_define, // ‚ª«î票¥ ä « //Ž¯à¥¤¥«¥¨¥ ª®áâ âë
|
||
tk_import, // ˆ¬¯®àâ ¨§ DLL
|
||
tk_map, // ƒ¥¥à æ¨ï MAP-ä ©«
|
||
tk_debug, // ƒ¥¥à æ¨ï ®â« ¤®ç®© ¨ä®à¬ 樨
|
||
tk_list, // ‚ë¤ ç ASM-«¨á⨣
|
||
tk_dll, // ƒ¥¥à æ¨ï DLL-ä ©«
|
||
tk_loop,tk_return,tk_do,
|
||
tk_while,tk_void,
|
||
tk_continue,tk_break,
|
||
tk_docase,tk_case,tk_default,
|
||
tk_carryflag,tk_extract,tk_FALSE,tk_from,
|
||
tk_notcarryflag,tk_notoverflow,tk_overflow,tk_TRUE,
|
||
tk_zeroflag,tk_notzeroflag,
|
||
tk_assign,tk_swap,
|
||
tk_minus,tk_plus,
|
||
tk_minusminus,tk_plusplus,tk_mult,tk_div,tk_mod,
|
||
tk_multminus,tk_divminus,tk_modminus,tk_rr,tk_ll,
|
||
tk_rrminus,
|
||
tk_llminus,
|
||
tk_minusequals,tk_plusequals,tk_rrequals,tk_llequals,
|
||
tk_or,tk_and,tk_xor,tk_not,
|
||
tk_orminus,
|
||
tk_andminus,tk_xorminus,
|
||
tk_orequals,tk_andequals,tk_xorequals,
|
||
tk_equalto,
|
||
tk_notequal,tk_greater,tk_greaterequal,tk_less,
|
||
tk_lessequal,
|
||
tk_oror,tk_andand,tk_openbrace,tk_closebrace,
|
||
tk_openbracket,tk_closebracket,tk_openblock,tk_closeblock,
|
||
tk_colon,tk_semicolon,tk_comma,tk_period,
|
||
tk_dollar,tk_question,tk_tilda,
|
||
tk_reg,tk_controlreg,tk_debugreg,tk_testreg,tk_seg,
|
||
tk_undefproc,tk_proc,
|
||
tk_postnumber,
|
||
tk_local,tk_locallabel,tk_param,tk_locnumber,
|
||
tk_DLL,tk_API,tk_directive,tk_command,tk_mnemonics,
|
||
tokens
|
||
};
|
||
// ---- Š®¤¨à®¢ª ⨯ ¯à®æ¥¤ãà
|
||
enum{ cpt_near, cpt_far };
|
||
// ---- Š®¤¨à®¢ª POST § ¯¨á¥©
|
||
enum { POST_CALL=1, POST_API, POST_DATA, POST_LOC, POST_STR };
|
||
// ---- Ž¯¨á ¨¥ áâàãªâãàë ¢ dbginfo: dbg_...
|
||
enum{ dbg_mod=0, // <20>®¬¥à ¬®¤ã«ï
|
||
dbg_line=4, // <20>®¬¥à áâப ¢ ¬®¤ã«¥
|
||
dbg_loc=8, // <20>®§¨æ¨ï ¢ EXE-ä ©«¥
|
||
dbg_size=12}; // à §¬¥à áâàãªâãàë
|
||
// ---- Ž¯¨á ¨¥ áâàãªâãàë idrec
|
||
enum{ left=0, // “ª § ⥫ì idrec
|
||
right=4, // “ª § ⥫ì idrec
|
||
recid=8, // ˆ¬ï ¨¤¥â¨ä¨ª â®à
|
||
newid=recid+4, // “ª § â¥«ì «¨ á ¤«ï recid
|
||
rectok=newid+4, // <20>®¬¥à token
|
||
rectype=rectok+4, // ’¨¯ token: void, byte, char, word, ...
|
||
recsrc=rectype+4, // ˆáå®¤ë© â¥ªáâ
|
||
recpost=recsrc+4, // ”« £ POST ¯¥à¥¬¥®©
|
||
recnumber=recpost+4, // ‡ 票¥ ¨«¨ offset ¢ recsrc
|
||
recmodline=recnumber+4,// <20>®¬¥à ¬®¤ã«ï ¨ áâப¨
|
||
recsize=recnumber+4};// à §¬¥à áâàãªâãàë
|
||
// ---- Ž¯¨á ¨¥ áâàãªâãàë localrec
|
||
enum{ localnext=0, // “ª § ⥫ì á«¥¤ãîéãî localrec
|
||
localid=4, // ˆ¬ï «®ª «ì® ¯¥à¥¬¥®©
|
||
localtok=localid+IDLENGTH,// ‡ 票¥ token
|
||
localtype=localtok+4, // ⨯ ¯¥à¥¬¥®©
|
||
localnumber=localtype+4, // <20>®§¨æ¨ï ¢ á⥪¥
|
||
local_size=localnumber+4}; // <20> §¬¥à áâàãªâãàë
|