The XGC Coral 66 compiler supports Official Definiton Coral 66 and the dialects offered by several other compilers. To select the dialect you may select each detail of that dialect, or you may select a profile that corresponds to the details.
For example, to select the SDL dialect, use the option -fsdl-profile.
The "Blandford Extensions" may be used to extend any dialect.
The following table gives the features that may be selected using a compile-time option.
Each compile time option should be prefixed with either -fpermit or -fno-permit as appropriate. For example, to prohibit binary numbers, use the option -fno-permit-binary-and-hex.
Example A-1. Source File with Extension Keywords
'begin' 'integer' i := 'binary'(1010101010101010); 'integer' j := 'octal'(125252); 'integer' k := 'hex'(aaaa); 'end'
When we compiler the file b1.cor with the option -fno-permit-binary-and-hex, the keywords BINARY and HEX are flagged as illegal keywords.
$ m68k-coff-gcc -c --list b1.cor -fno-permit-binary-and-hex XGC CORAL66 Compiler Version 1.7 Compiling: b1.cor (time stamp: 2001/10/27 18:23:35) 1. 'begin' 2. 'integer' i := 'binary'(1010101010101010); | >>> error: Illegal keyword 'binary' 3. 'integer' j := 'octal'(125252); 4. 'integer' k := 'hex'(aaaa); | >>> error: Illegal keyword 'hex' 5. 'end' 2 errors, 0 warnings, 0 comments
Table A-1 lists all the extension options and their default values. Several additional options, not documented here, allow one of several option dialects to be set. The default dialect is the XGC dialect and is set by default, or by the compiler option -fxgc-profile.
Table A-1. Optional Language Extensions
Rest of Compiler Option | Description | Default Value |
---|---|---|
-binary-and-hex | Allow the keywords BINARY and HEX, to express numeric literals to bases 2 and 16. | 1 |
-byte-numbertype | Allow the keyword BYTE, used to declare single bytes and byte arrays. | 1 |
-constant-declarations | Allow the keyword CONSTANT to declare a named number. | 1 |
-double | Allow the keyword DOUBLE in place of LONG FLOATING | 1 |
-enter | Allow the ENTER keyword (the ENTER statement is ingored and included for compatibility with otehr compilers) | 1 |
-floating-fixed | Map Coral fixed point number types to target floating point instead of target integer | 0 |
-xgc-code-statements | Allow XCC code statements | 1 |
-honeywell-comments | Allow special characters in column one to indicate a comment line or page throw | 0 |
-ident | Allow the Digital Coral IDENT statement | 1 |
-include | Use the INCLUDE statement to include source text from other files. This is in place of the LIBRARY statement. | 1 |
-list | Allow the LIST keyword (which is ignored). | 1 |
-long-numbertypes | Allow LONG INTEGER, LONG FIXED and LONG FLOATING. | 1 |
-named-common | Allow common declaration to be named. | 1 |
-named-external | Allow external declarations to be named. | 1 |
-nonstrict-bracketed-comment | Allow bracketed comment where the Official Declaration fobids it, but where it is syntactically acceptable, after THEN, ELSE and BEGIN. | 1 |
-program-name | Allow a program to begin "CORAL PROGRAM Id". Note that the program name is ignored. | 1 |
-rad50 | Allow the Digital Coral RAD50 command form. | 1 |
-relational-keywords | Allow the realational operators to be written as keywords EQ, NE, LT, GT, LE an GE. | 1 |
-sdl-code-statements | Permit SDL format code statements. Note these are not fully supported. | 0 |
-segment-name | Allow a program to begin with "SEGMENT Id". | 1 |
-shift-operators | Allow the shift operators SLL, SRL, SLA, SRA SLC, SRC. | 1 |
-short-identifiers | Allow identifers to be truncated at 12 characters. | 1 |
-string-length-prefix | Place the length of a string in the first byte of the string. | 0 |
-string-command-presets | Allow string literals to preset byte arrays. | 1 |
-test | Allow the TEST keyword and the text options. | 1 |
-title | Allow the TITLE keyword. | 1 |
-typed-anonymous-reference | Allow a form of anonymous reference where the result type is other than INTEGER. For exmaple, allow "FLOATING [addr]". | 1 |
-underscores-in-identifiers | Allow identifiers to contain underscore characters. | 1 |
-unsigned-literals | Allow integer literals to extend up to maximum unsigned value of the type so that, for example, the value -1 can be written as HEX(FFFFFFFF). | 1 |
-uppercase-keywords | Keywords are written in upper case and not between apostrophes. | 0 |