BARfly Help - BAR Implementation File Reference - Fundamental Components

  Punctuators

Punctuators are sequences of characters that denote declarations and inter-statement grammar.  Punctuators include the semicolon, the colon, the comma, parentheses, curly braces, brackets, the equal sign, the ampersand, and the asterisk.  Punctuators are predefined tokens.

Punctuator ::= ‘;’ | ‘:’ | ‘,’ | ‘(’ | ‘)’ | ‘{’ | ‘}’ | ‘[’ | ‘]’ | ‘=’ | ’&’ | ‘*’ | ‘::=’

  • Semicolon: This is a general-purpose statement terminator, found everywhere in the text.
  • Colon: A single colon denotes either a “derived-from” separator or a label when found as the second token in a statement in a function body, if the first token is alphanumeric/underscore.
  • Comma: This is a general-purpose momentary delimiter in declarations. Unlike semicolons, commas primarily serve to separate declaration identifiers within a declaration.
  • Parentheses: These are used to indicate a function declaration, with ‘(‘ denoting the start of the parameter list and ‘)’ denoting the end.
  • Curly Braces: These are used to define a new level of scope, with ‘{‘ denoting the start and ‘}’ denoting the end. The type of scope depends on the type of declaration.
  • Brackets: These are used to specify array element counts in variable declarations, with ‘[‘ denoting the start and ‘]’ denoting the end.
  • Equal Sign: This tells the compiler to assign an initial value in a variable declaration.
  • Ampersand: This tells the compiler to start an opcode/mod byte escape sequence.
  • Asterisk: This tells the compiler to adopt a pointer type in a variable declaration.
  • Regular Expression Block Definition: This identifies the start of a regular expression block definition, an alternate form of unorganized block definition.

You do not need to include whitespace before or after punctuators in order to distinguish them from most other I.F. components.  However, some operators, such as the '==' equality operator, are automatically assumed if two equal signs are spliced together without whitespace.


  See also:  [Punctuators] [Operators] [Keywords]
[Identifiers] [Numbers] [String literals] [Remarks]
[Preprocessor directives] [Whitespace] [Unrecognized characters]


BARfly Help Copyright © 2009 Christopher Allen