#ifndef __ICODE2ASTDATA_C__
#define __ICODE2ASTDATA_C__ 1

// These belong in a .h header file however because header files can be
// included in multiple files, doing so would cause multiple copies of
// these arrays, which is either a waste of space or an error.

const char *rcs_version = "icode2ast.h V$Revision: 1.2 $";

const char *icode_name[] = {
"<0>", "<1>", "<2>", "<3>", "<4>", "<5>", "<6>", "<7>",
"<8>", "<9>", "EOF", "<11>", "<12>", "<13>", "<14>", "<15>",
"<16>", "<17>", "<18>", "<19>", "<20>", "<21>", "<22>", "<23>",
"<24>", "<25>", "<26>", "<27>", "<28>", "<29>", "<30>", "<31>",
"<32>", "OR    ", "JUMPIFD", "BNE   ", "DEF   ", "XOR   ", "AND   ", "PUSHS ",
"BLE   ", "BGE   ", "MUL   ", "ADD   ", "PLUS  ", "SUB   ", "CONCAT", "QUOT  ",
"<'0'>", "<'1'>", "<'2'>", "<'3'>", "<'4'>", "<'5'>", "<'6'>", "<'7'>",
"<'8'>", "<'9'>", "LOCATE", "END   ", "blt   ", "beq   ", "bgt   ", "JUMPIF",
"PUSH  ", "INIT  ", "REPEAT", "JUMPIFA", "PUSHR ", "CALL  ", "GOTO  ", "ALIAS ",
"BEGIN ", "select-input-2", "JUMP  ", "FALSE ", "LABEL ", "MAP   ", "PUSHI ", "LINE  ",
"PLANT ", "DIVIDE", "RETURN", "ASSVAL", "TRUE  ", "NEGATE", "RESULT", "SJUMP ",
"IEXP  ", "DEFAULT", "ASSREF", "LSH   ", "NOT   ", "RSH   ", "PROC  ", "SLABEL",
// DEFSW is an added I-Code (actually a restored one, as this code existed in older compilers)
// for the default switch label.  Imp77, by the time this pass1 was in use, had abandoned
// an explicit code for this and was outputting all the missing labels explicitly, but
// that scheme will not work for i2c.

// New code 'REDEF' is identical to 'DEF' except that it is only for internal use by i2c
// and should not cause any C to be output.
"DEFSW ", "ACCESS", "BOUNDS", "MCODE1", "DIM   ", "EVENT ", "FOR   ", "REDEF ", /* 'g' */
"ALTBEG", "INDEX ", "JAM   ", "BF    ", "LANG  ", "MONITOR", "SELECT", "ON    ",
"ASSPAR", "SUBA  ", "RESOLVE", "STOP  ", "BT    ", "ADDA  ", "MOD   ", "MCODE2",
"REXP  ", "DIAG  ", "CONTROL", "START  (", "ALT |", "FINISH )", "ALTALT", "<127>",
// ALTALT is an escape code which is followed by alternative encoding of START/ALT/FINISH
// (this is in the original pass1 - not sure why the standard encoding was changed unless
//  it was because PSR was running out of printable opcodes and needed some more for the
//  extensions to I-Code needed when adding new languages?)

// reserved for later versions of ICode.
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",
"<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>", "<128-255>",

// After 255, the codes are higher-level extensions to the AST generated by us.

"Perms  ",

};

const char *specialdesc[] = {
  /*  0: */ "none",
  /*  1: */ "byte-integer",
  /*  2: */ "short-integer",
  /*  3: */ "long-real",
};

const char *typedesc[16] = {
  /*  0: */ "<type:0>",
  /*  1: */ "integer",
  /*  2: */ "real",
  /*  3: */ "string",
  /*  4: */ "record",
  /*  5: */ "Boolean",
  /*  6: */ "set",
  /*  7: */ "byte-enumerated",
  /*  8: */ "short-enumerated",
  /*  9: */ "pointer",
  /* 10: */ "char",
  /* 11: */ "<type:11>",
  /* 12: */ "<type:12>",
  /* 13: */ "<type:13>",
  /* 14: */ "<type:14>",
  /* 15: */ "general-area"
};

const char *formdesc[16] = {
  /*  0: */ "<form:0>",
  /*  1: */ "simple",
  /*  2: */ "name",
  /*  3: */ "label",
  /*  4: */ "record-format",
  /*  5: */ "<form:5>",
  /*  6: */ "switch",
  /*  7: */ "routine",
  /*  8: */ "function",
  /*  9: */ "map",
  /* 10: */ "predicate",
  /* 11: */ "array",
  /* 12: */ "array-name",
  /* 13: */ "name-array",
  /* 14: */ "name-array-name",
  /* 15: */ "<form:15>",
};

const char *linkagedesc[] = {
  /*  0: */ "auto",
  /*  1: */ "own",
  /*  2: */ "constant",
  /*  3: */ "external",
  /*  4: */ "system",
  /*  5: */ "dynamic",
  /*  6: */ "prim",
  /*  7: */ "perm"
};

//struct { int mask; char *name; } oflags[] = {
//    8,  "-spec",
//    16, "-indirect",
//    32, "-unass"
//};

#endif // __ICODE2ASTDATA_C__
