Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349343

Summary: Extensible way to choose the type of a literal
Product: z_Archived Reporter: Matt Heitz <mheitz>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: jspadea, pharmon, svihovec, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: Extensibility_Compile

Description Matt Heitz CLA 2011-06-14 12:41:47 EDT
Different compilers may need to assign different types to a literal.  For example, in RBD the literal 12345 is of type int (because the length is > 4 and < 10) but in EDT its type is smallint (because it can be stored in a smallint variable).  When RBD's code is based on EDT, we need a way for the RBD compiler to insert its own rules about the types of literals.  Other generators may find this useful as well.
Comment 1 Brian Svihovec CLA 2011-12-16 15:33:12 EST
Tim, should this be considered for the .8 release?
Comment 2 Justin Spadea CLA 2012-06-19 13:51:48 EDT
Is this still relevant now that we let the user specify specific types to be attached to the literals? e.g. '123F' to make it a float literal.
Comment 3 Matt Heitz CLA 2012-06-19 14:19:13 EDT
This is only relevant if we plan to use the EDT compiler to compile code written in RBD.  But I don't think we'll do that.  It seems more likely that we'd write a new compiler for RBD code, and that compiler will be free to do whatever it wants with the literals.