The Patterns statement has no attributes.
The substatements of the Patterns statement are as follows:
|This substatement defines the surface patterns for a given operation code in the intermediate language.
The attributes of the Pattern statement are as follows:
|This attribute is the identifier of an operation code as defined in the Opcodes statement for the intermediate language.
|This nonterminal substatement specifies which suboperation of the operation code is to receive surface pattern definitions.
|This deprecated terminal substatement specifies a surface pattern for the Basic project file syntax.
|This deprecated terminal substatement specifies a surface pattern for the VB6/ASP/VbScript source language syntaX.
|This terminal substatement specifies a surface pattern for C# syntax.
|This terminal substatement specifies a surface pattern for VB.NET syntax.
|This terminal substatement specifies a surface pattern for gmSL syntax.
|This terminal substatement specifies a surface pattern for an external user specified syntax.
|This terminal substatement specifies an all other syntax. When used it must be the final statement in the set of surface patterns being defined. The author will use this pattern if no explicit pattern exists for the target language syntax currently being authored.
|This attribute is the identifier of a suboperation code for the Pattern operation code as defined in the Opcodes statement for the intermediate language.
Any given operation code or operation code, subcode combination can have as many different surface patterns as needed associated with it. Operation codes that have no subcodes associated with them use this form.
<pattern id="opc"> <syntax 1 .../> ... <syntax n .../> </pattern>
<pattern id="opc"> <subcode id="subcode 1" > <syntax 1 .../> ... <syntax n .../> </subcode> ... <subcode id="subcode n" > <syntax 1 .../> ... <syntax n .../> </subcode> </pattern>
|Encountered following when expecting 'pattern': %1d
|Pattern command missing required id attribute.
|The pattern identifier [%1d] is not recognized.
|The operation [%1d] already has surface forms specified.
|Encountered following when expecting 'subcode': %1d
|The required subcode identifier is missing.
|The component [%1d] is not defined for the operation"
|The subcode [%1d] already has surface forms specified.
The attributes of the surface form statements are as follows:
|An integer value specifying the precedence of the operator relative to others. As the output production proceeds, it is necessary to enclose certain operations in parentheses to achieve the proper order of evaluation. The current precedence of each operand is maintained. When two operators of lower precedence are combined via an operator of higher precedence, then they are enclosed in parentheses.
|An optional keyword describing the overall status of the operation: Ok, Delete, Deprecated, NotImplemented, MustCorrect, NotIdent, Postfix, or NeedsPren.
|An optional keyword describing the overall role of the operation: Unknown, Property, Method, Define, Utility, Command, Constant, Function, Event, Control, Collection, Resource, Index, or Migclass.
|An integer value specifying the number of operands associated with the operation -- i.e., whether the operation is null, or unary, or binary, etc. -- for the particular language. All operations are reverse polish; therefore, when a given operation is encountered, its operand strings have already been placed on the string-machine stack. The operands are numbered starting with the oldest first. In other words, the operand deepest on the stack is argument 1 and the operand at the top of the stack is argument n, for an n-ary operator.
|A pattern string which specifies an arbitrary but fixed concatenation of the operands and of other character sequences which can be described via a linear pattern string. The pattern string describes not only how the operands are combined but also how the various constants, symbol table entries, and miscellaneous special-purpose conversion routines combine to form the final output.
Content of pattern strings
Within the pattern strings there are three types of specifications. First, there are special operation parameters which consist of a backslash followed by a letter. These parameters trigger special conversions. Second, there are operand conversion parameters which consist of a percent sign, followed by a numeric digit, followed by a conversion code. The numeric digit specifies which operand is to be entered at this point in the string, and the conversion code specifies any special operation to be performed. Third, there are simple character specifications which are any characters not forming one of the two specifications above. Simple characters are entered into result strings exactly as entered.
The special operation parameter characters are as follows:
Each conversion code has an argument string associated with it that was removed from the string stack. They all also compare the hierarchy levels as described above to determine if parentheses have to be entered. The conversion codes differ in what changes they make in the argument string before they enter it into the current record. The conversion code characters are as follows: