Package org.apache.etch.compiler

Examples of org.apache.etch.compiler.Token


  @Override
  public String getTypeValue( TypeRef type, Token value )
  {
    // System.out.println( "getTypeValue called with: "+type+": "+value );
    Token t = type.type();
    switch (t.kind)
    {
      case EtchGrammarConstants.LONG:
          return "int64(" + value.image + ")";
      case EtchGrammarConstants.FLOAT:
View Full Code Here


   * while etch string -> java String.
   */
  @Override
  public String getNativeTypeName( TypeRef type )
  {
    Token t = type.type();
    switch (t.kind)
    {
      case EtchGrammarConstants.VOID:
        return "";
      case EtchGrammarConstants.BOOLEAN:
View Full Code Here

   * @return the fundamental native reference type for java. so etch int ->
   * java Integer, while etch string -> java String.
   */
  private String getRefTypeName( TypeRef type )
  {
    Token t = type.type();
    switch (t.kind)
    {
      case EtchGrammarConstants.VOID:
        return "";
      case EtchGrammarConstants.BOOLEAN:
View Full Code Here

  @Override
  public String getTypeValue( TypeRef type, Token value )
  {
    // System.out.println( "getTypeValue called with: "+type+": "+value );
    Token t = type.type();
    switch (t.kind)
    {
      case EtchGrammarConstants.LONG:
        return value.image + "l";
      case EtchGrammarConstants.FLOAT:
View Full Code Here

   * while etch string -> java String.
   */
  @Override
  public String getNativeTypeName( TypeRef type )
  {
    Token t = type.type();
    switch (t.kind)
    {
      case EtchGrammarConstants.VOID:
        return "void";
      case EtchGrammarConstants.BOOLEAN:
View Full Code Here

   * @return the fundamental native reference type for java. so etch int ->
   * java Integer, while etch string -> java String.
   */
  private String getRefTypeName( TypeRef type )
  {
    Token t = type.type();
    switch (t.kind)
    {
      case EtchGrammarConstants.VOID:
        return "void";
      case EtchGrammarConstants.BOOLEAN:
View Full Code Here

    return msg.getAsyncReceiver().toString().toLowerCase();
  }

  @Override
  public String getTypeValue(TypeRef type, Token value) {
    Token t = type.type();
    switch (t.kind) {
    case EtchGrammarConstants.LONG:
      return value.image + "LL";
    case EtchGrammarConstants.FLOAT:
    case EtchGrammarConstants.DOUBLE:
View Full Code Here

  public String getNativeTypeName(TypeRef type, boolean addStruct, boolean etch_type) {
    if (type.isArray()) {
      return (etch_type ? "etch_arraytype" : "etch_arraytype*");
    }
   
    Token t = type.type();
    switch (t.kind) {
    case EtchGrammarConstants.VOID:
      return "void";
    case EtchGrammarConstants.BOOLEAN:
      return (etch_type ? "etch_boolean" : "boolean");
View Full Code Here

    return msg.getAsyncReceiver().toString().toLowerCase();
  }

  @Override
  public String getTypeValue(TypeRef type, Token value) {
    Token t = type.type();
    switch (t.kind) {
    case EtchGrammarConstants.LONG:
      return value.image + "LL";
    case EtchGrammarConstants.FLOAT:
    case EtchGrammarConstants.DOUBLE:
View Full Code Here

    sb.append("\"");
    return sb.toString();
  }

  private String getNativeArrayTypeName(TypeRef type) {
    Token t = type.type();
    String nativeArrayName = "EtchNativeArray";
    switch (t.kind) {
    case EtchGrammarConstants.BOOLEAN:
      return nativeArrayName + "Bool";
    case EtchGrammarConstants.BYTE:
View Full Code Here

TOP

Related Classes of org.apache.etch.compiler.Token

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.