There are syntax rules that apply to both BEE Script and BEE Tags.
1) Command Names must be a string of alphanumeric characters or underscore that starts with a non-numeric character. Leading underscore string will be ignored.
2) There must be at least a white space before the Attribute Name. If there are white spaces inside the value, the whole value should be quoted by a pair of double or single quotation marks.
3) Spaces around the equal sign in an Attribute Name-Value Pair are optional.
4) Unquoted Attribute Values are terminated by a white space or the terminator (';' for BEE Script and '>' for BEE Tag).
5) Quoted Attribute Values open and close with the same quotation mark (both double or both single). If the value contains the quotation mark itself, it can be escaped by a back-slash. (Quoted Attribute Values can contain white spaces including line break. So you can specify multi-line values.)
6) An "Absolute" Attribute Value is one that is NOT evaluated automatically for BEE Variables before passing to the tag function (please see BEE Variables for details about the evaluation process.) An Attribute is "absolute" if the Attribute Name is preceded with an exclamation mark ('!').
7) Attribute Names must be a string of alphanumeric characters or underscore that starts with a non-numeric character. You can be optionally preceded by an underscore '_' or an exclamation mark '!'. Attribute Names are case insensitive and all spaces and underscores in it will be ignored.
8) If the Attribute Name and the equal sign is omitted, the Attribute Name is assumed to be the Tag Name. For example, "clear abc;" means "clear clear=abc;".
9) The Attribute Name "tag" is reserved for parser use. (In fact, the Tag Name is the Attribute Value of the "tag" parameter. "<beeclear clear=abc>" is the same as "<bee tag=clear clear=abc>".)
10) If the BEE Command Name is prefixed by an object name and a '%' sign, the object name and the '%' sign will be extracted and a new Attribute Name "this" will be inserted with the object name as the Attribute Value. For example, "myobj%func ..." will be translated to "func this=myobj ...".
One point that may not be obvious from the quotation rules (4 and 5): Because BEE Variables are non-typed, quotation marks do not change the type of the value they enclosed; they only serve to allow spaces inside the value without causing parsing problem. For example, var abc = "flower"; is the syntactically and semantically the same as var abc = flower; or even var "abc" = flower;.
However, if there are white spaces in the value string, the quotation marks are required. For example, var abc = "red flower"; is OK, but var abc = red flower; will assign only "red" into variable abc. The string "flower" will be taken as a separate parameter and ignored.
|