Java2D III

BLS lietz at wanadoo.fr
Thu Jul 20 10:53:12 PDT 2006


okay,
the Java Parser, the Java AST Parser and very basic work on the D Emitter
are done.

DEmitter > A class that can take an ANTLR Java AST and produce formatted
 D Java code from it

I guess the string, array and modifiers stuff will be tricky.

anyway, first things first :the following table has to be transformed :
is somebody out there who is kind enough to give me advice regarding the
modifieres stuff : well translationg the table to D is also highly welcome
<g>

  tokenNames[POST_INC]="++";
  tokenNames[POST_DEC]="--";
  tokenNames[UNARY_MINUS]="-";
  tokenNames[UNARY_PLUS]="+";
  tokenNames[STAR]="*";
  tokenNames[ASSIGN]="=";
  tokenNames[PLUS_ASSIGN]="+=";
  tokenNames[MINUS_ASSIGN]="-=";
  tokenNames[STAR_ASSIGN]="*=";
  tokenNames[DIV_ASSIGN]="/=";
  tokenNames[MOD_ASSIGN]="%=";
  tokenNames[SR_ASSIGN]=">>=";
  tokenNames[BSR_ASSIGN]=">>>=";
  tokenNames[SL_ASSIGN]="<<=";
  tokenNames[BAND_ASSIGN]="&=";
  tokenNames[BXOR_ASSIGN]="^=";
  tokenNames[BOR_ASSIGN]="|=";
  tokenNames[QUESTION]="?";
  tokenNames[LOR]="||";
  tokenNames[LAND]="&&";
  tokenNames[BOR]="|";
  tokenNames[BXOR]="^";
  tokenNames[BAND]="&";
  tokenNames[NOT_EQUAL]="!=";
  tokenNames[EQUAL]="==";
  tokenNames[LT]="<";
  tokenNames[GT]=">";
  tokenNames[LE]="<=";
  tokenNames[GE]=">=";
  tokenNames[SL]="<<";
  tokenNames[SR]=">>";
  tokenNames[BSR]=">>>";
  tokenNames[PLUS]="+";
  tokenNames[MINUS]="-";
  tokenNames[DIV]="/";
  tokenNames[MOD]="%";
  tokenNames[INC]="++";
  tokenNames[DEC]="--";
  tokenNames[BNOT]="~";
  tokenNames[LNOT]="!";
  tokenNames[FINAL]="final";
  tokenNames[ABSTRACT]="abstract";
  tokenNames[LITERAL_package]="package";
  tokenNames[LITERAL_import]="import";
  tokenNames[LITERAL_void]="void";
  tokenNames[LITERAL_boolean]="boolean";
  tokenNames[LITERAL_byte]="byte";
  tokenNames[LITERAL_char]="char";
  tokenNames[LITERAL_short]="short";
  tokenNames[LITERAL_int]="int";
  tokenNames[LITERAL_float]="float";
  tokenNames[LITERAL_long]="long";
  tokenNames[LITERAL_double]="double";
  tokenNames[LITERAL_private]="private";
  tokenNames[LITERAL_public]="public";
  tokenNames[LITERAL_protected]="protected";
  tokenNames[LITERAL_static]="static";
  tokenNames[LITERAL_transient]="transient";
  tokenNames[LITERAL_native]="native";
  tokenNames[LITERAL_threadsafe]="threadsafe";
  tokenNames[LITERAL_synchronized]="synchronized";
  tokenNames[LITERAL_volatile]="volatile";
  tokenNames[LITERAL_class]="class";
  tokenNames[LITERAL_extends]="extends";
  tokenNames[LITERAL_interface]="interface";
  tokenNames[LITERAL_implements]="implements";
  tokenNames[LITERAL_throws]="throws";
  tokenNames[LITERAL_if]="if";
  tokenNames[LITERAL_else]="else";
  tokenNames[LITERAL_for]="for";
  tokenNames[LITERAL_while]="while";
  tokenNames[LITERAL_do]="do";
  tokenNames[LITERAL_break]="break";
  tokenNames[LITERAL_continue]="continue";
  tokenNames[LITERAL_return]="return";
  tokenNames[LITERAL_switch]="switch";
  tokenNames[LITERAL_throw]="throw";
  tokenNames[LITERAL_case]="case";
  tokenNames[LITERAL_default]="default";
  tokenNames[LITERAL_try]="try";
  tokenNames[LITERAL_finally]="finally";
  tokenNames[LITERAL_catch]="catch";
  tokenNames[LITERAL_instanceof]="instanceof";
  tokenNames[LITERAL_this]="this";
  tokenNames[LITERAL_super]="super";
  tokenNames[LITERAL_true]="true";
  tokenNames[LITERAL_false]="false";
  tokenNames[LITERAL_null]="null";
  tokenNames[LITERAL_new]="new";

thanks bjoern





More information about the Digitalmars-d-announce mailing list