Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
language:attributes [2024/08/07 07:04]
rajit [Production rule attributes]
language:attributes [2024/08/07 07:11] (current)
rajit [Attributes]
Line 1: Line 1:
 ====== Attributes ====== ====== Attributes ======
  
-ACT provides a mechanism to specify user-customizable //attributes//. These can be attached to both instances as well as production rules. Different ACT tools can use these attributes for a variety of purposes. +ACT provides a mechanism to specify user-customizable //attributes//. These can be attached to both instances as well as production rules. Different ACT tools can use these attributes for a variety of purposes. The meaning of these attributes is not pre-specified in the ACT language; rather, the set of valid attributes is specified in the ACT configuration file, and these attributes can be queried by tools. Hence, the meaning of these attributes is determined by how they are used by tools. Existing tools make use of a number of attributes as discussed below.
 ===== Production rule attributes ===== ===== Production rule attributes =====
  
Line 18: Line 17:
  
 The list of production rule attributes recognized by ACT is user-customizable, and is described in the [[config:runtime#attributes|ACT configuration]] file. The list of production rule attributes recognized by ACT is user-customizable, and is described in the [[config:runtime#attributes|ACT configuration]] file.
 +
 +===== Instance attributes =====
 +
 +The other category of attributes is the //instance attribute//. The list of these is also extensible and can be defined in [[config:runtime#attributes|ACT configuration]] files.
 +
 +The syntax is:
 +<code act>
 +bool a;
 +a @ [attrib1=value1; attrib2=value2];
 +</code>