Stide has three basic types:
Basics types are implicitly declared.
A number without a fractional component is treated as an integer. An integer is a constant block without an identifier and an integer value assigned to it. It has a constant integer output port.
# Integer representation
constant INTEGER {
value: INTEGER
meta: none
}
INTEGER: | -?[0-9]+ |
---|---|
Example: | 0 , 1024 , -32768 |
A number with a fractional component is treated as a real. A real is a constant block without an identifier and a real value assigned to it. It has a constant real output port.
## Real representation
constant REAL {
value: REAL
meta: none
}
REAL: | -?({ [0-9]+.[0-9]*} | {[0-9]*.[0-9]+ }) |
---|---|
Example: | .1, 1.1, 1., -.1, -1.1, -1. |
A sequence of characters enclosed in single or double quotation marks is treated as a string. A string is a constant block without a identifier and has a string value assigned to it. It has a constant string output port.
# String representation
constant STRING {
value: STRING
meta: none
}
STRING: | { '.+ '} | { ".+ "} |
---|---|
Example: | 'A sting.', "A string." |