Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculated representation references to string or enum? #5

Open
ghost opened this issue Jan 4, 2011 · 0 comments
Open

Calculated representation references to string or enum? #5

ghost opened this issue Jan 4, 2011 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 4, 2011

Consider the following IML (CDL) example:

component CYGHWR_MEMORY_LAYOUT{ display "Memory layout" calculated [CYG_HAL_STARTUP == "RAM" ? (CYGHWR_HAL_I386_PC_LOAD_HIGH ? "i386_pc_ram_hi" : "i386_pc_ram") : CYG_HAL_STARTUP == "ROM" ? "i386_pc_rom" : CYG_HAL_STARTUP == "GRUB" ? (CYGHWR_HAL_I386_PC_LOAD_HIGH ? "i386_pc_grub_hi" : "i386_pc_grub") : "i386_pc_floppy" ] flavor data

and Clafer translation
CYGHWR_MEMORY_LAYOUT -> string display = "Memory layout" calculated: [this = CYG_HAL_STARTUP = "RAM" => (CYGHWR_HAL_I386_PC_LOAD_HIGH => "i386_pc_ram_hi" else "i386_pc_ram") else CYG_HAL_STARTUP = "ROM" => "i386_pc_rom" else CYG_HAL_STARTUP = "GRUB" => (CYGHWR_HAL_I386_PC_LOAD_HIGH => "i386_pc_grub_hi" else "i386_pc_grub") else "i386_pc_floppy"]

Is reference string, or it should be CYGHWR_MEMORY_LAYOUT_ENUM ?
with enum declaration
CYGHWR_MEMORY_LAYOUT_ENUM = "i386_pc_floppy" | "i386_pc_grub_hi" | "i386_pc_grub" | "i386_pc_rom" | "i386_pc_ram" | "i386_pc_ram_hi"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants