Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
Pragmas#1 Pragma syntax diagrampragma := '<*' pragmaBody '*>' ; #1.1 Pragma Body syntax diagrampragmaBody := ctMsgPragma | condCompPragma | procDeclAttrPragma | promiseToWritePragma | forwardDeclPragma | charEncodingPragma | memAlignmentPragma | bitPaddingPragma | purityAttrPragma | varDeclAttrPragma | deprecationPragma | genTimestampPragma | memMappingPragma | ffiPragma | ffidentPragma | implDefinedPragma ; #2 Body Of Compile Time Message Pragma syntax diagramctMsgPragma := MSG '=' ctMsgMode ':' ctMsgComponentList ; #2.1 Message Mode syntax diagramctMsgMode := INFO | WARN | ERROR | FATAL ; #2.2 Message Component List syntax diagramctMsgComponentList := ctMsgComponent ( ',' ctMsgComponent )* ; #2.3 Message Component syntax diagramctMsgComponent := StringLiteral | constQualident | '?' valuePragma ; #2.4 Constant Qualified Identifier syntax diagramconstQualident := qualident ; #2.5 Value Pragma syntax diagramvaluePragma := ALIGN | ENCODING | valuePragmaSymbol ; #2.6 Value Pragma Symbol syntax diagramvaluePragmaSymbol := PragmaSymbol ; #2.7 Pragma Symbol syntax diagramPragmaSymbol := Letter+ ; #3 Body Of Conditional Compilation Pragma syntax diagramcondCompPragma := ( IF | ELSIF ) inPragmaExpression | ELSE | END ; #4 Body Of Procedure Declaration Attribute Pragma syntax diagramprocDeclAttrPragma := INLINE | NOINLINE | BLOCKING | NORETURN ; #5 Body Of Promise-To-Write Pragma syntax diagrampromiseToWritePragma := OUT ; #6 Body Of Forward Declaration Pragma syntax diagramforwardDeclPragma := FORWARD ( TYPE identList | procedureHeader ) ; #7 Body Of Character Encoding Pragma syntax diagramcharEncodingPragma := ENCODING '=' StringLiteral /* "ASCII" or "UTF8" */ ( ':' codePointSampleList )? ; #7.1a Code Point Sample List syntax diagramcodePointSampleList := codePointSample ( ',' codePointSample )* ; #7.1b Code Point SamplecodePointSample := quotedCharacter '=' charCodeLiteral ; #7.2 Quoted Character syntax diagramquotedCharacter := StringLiteral ; /* single character only */ #7.3 Character Code Literal syntax diagramcharCodeLiteral := NumberLiteral ; /* whole number only */ #8 Body Of Memory Alignment Pragma syntax diagrammemAlignmentPragma := ALIGN '=' inPragmaExpr ; #9 Body Of Bit Padding Pragma syntax diagrambitPaddingPragma := PADBITS '=' inPragmaExpr ; #10 Body Of Purity Attribute Pragma syntax diagrampurityAttrPragma := PURITY '=' inPragmaExpr /* values 0 .. 3 */ ; #11 Body Of Variable Declaration Attribute Pragma syntax diagramvarDeclAttrPragma := SINGLEASSIGN | LOWLATENCY | VOLATILE ; #12 Body Of Deprecation Pragma syntax diagramdeprecationPragma := DEPRECATED ; #13 Body Of Library Generation Timestamp Pragma syntax diagramgenTimestampPragma := GENERATED template ',' datestamp ',' timestamp ; #13.1 Datestamp syntax diagramdatestamp := year '-' month '-' day ; #13.2 Timestamp syntax diagramtimestamp := hours ':' minutes ':' seconds utcOffset? ; #13.3 Year, Month, Day, Hours, Minutes, Seconds syntax diagramyear := wholeNumber ; month := wholeNumber ; day := wholeNumber ; hours := wholeNumber ; minutes := wholeNumber ; seconds := wholeNumber ; #13.4 UTC Offset syntax diagramutcOffset := ( '+' | '-' ) wholeNumber ; #14 Body Of Memory Mapping Pragma syntax diagrammemMappingPragma := ADDR '=' inPragmaExpr ; #15 Body Of Foreign Function Interface Pragma syntax diagramffiPragma := FFI '=' StringLiteral /* "C", "Fortran", "CLR" or "JVM" */ ; #16 Body Of Foreign Function Identifier Mapping Pragma syntax diagramffidentPragma := FFIDENT '=' StringLiteral /* foreign library identifier */ ; #17 Body Of Implementation Defined Pragma syntax diagramimplDefinedPragma := ( implPrefix '.' )? PragmaSymbol ( '=' inPragmaExpr )? '|' ctMsgMode ; #17.1 Implementation Prefix syntax diagramimplPrefix := Letter LetterOrDigit+ ; #18 In-Pragma Expression syntax diagraminPragmaExpr := inPragmaSimpleExpr ( inPragmaOperL1 inPragmaSimpleExpr )? ; #18.1 In-Pragma Level-1 Operator syntax diagraminPragmaOperL1 := '=' | '#' | '<' | '<=' | '>' | '>=' ; #19 In-Pragma Simple Expression syntax diagraminPragmaSimpleExpr := inPragmaTerm ( inPragmaOperL2 inPragmaTerm )* | '-' inPragmaFactor ; #19.1 In-Pragma Level-2 Operator syntax diagraminPragmaOperL2 := '+' | '-' | OR ; #20 In-Pragma Term syntax diagraminPragmaTerm := inPragmaSimpleTerm ( inPragmaOperL3 inPragmaSimpleTerm )* ; #20.1 In-Pragma Level-3 Operator syntax diagraminPragmaOperL3 := '*' | DIV | MOD | AND ; #21 In-Pragma Simple Term syntax diagraminPragmaSimpleTerm := NOT? inPragmaFactor ; #22 In-Pragma Factor syntax diagraminPragmaFactor := WholeNumber | /* constQualident is covered by inPragmaCtFunctionCall */ '(' inPragmaExpr ')' | inPragmaCtFunctionCall ; #23 In-Pragma Compile Time Function Call syntax diagraminPragmaCtFunctionCall := qualident ( '(' inPragmaExpr ( ',' inPragmaExpr )* ')' )? ; |