Literal

The diagrams below draw one box per node kind, with one port per field. The edge colours say how a link is held; they are listed in full on the Fields page.

digraph { rankdir="LR" nodesep=0.1 node [shape=point width=0.06 color="#888a85"] edge [fontname="monospace" fontsize=10 minlen=3] l0a -> l0b [label="owned" color="#000000"] l1a -> l1b [label="ref" color="#3465a4" style=dashed] l2a -> l2b [label="maybe ref" color="#3465a4" style=dotted] l3a -> l3b [label="of ref" color="#3465a4" style=dashed] l4a -> l4b [label="of maybe ref" color="#3465a4" style=dotted] l5a -> l5b [label="forward ref" color="#f57900" style=dashed] l6a -> l6b [label="maybe forward ref" color="#f57900" style=dotted] l7a -> l7b [label="chain" color="#4e9a06"] l8a -> l8b [label="chain next" color="#4e9a06" style=bold] }

Iir_Kind_Integer_Literal

Format: Short

Accessor

Field

Type

Access

Description

Value

Field4

Int64

owned

Get/Set the value of the integer.

Literal_Length

Field0

Int32

owned

Length of the literal in characters. Used for pretty print. Set to 0 when doesn’t come from the sources.

Literal_Origin

Field2

Iir

owned

The origin of a literal can be null_iir for a literal generated by the parser, or a node which was statically evaluated to this literal. Such nodes are created by eval_expr.

Type

Field1

Iir

ref

Expr_Staticness

State1

Iir_Staticness

owned

Expression staticness, defined by rules of LRM 7.4

digraph { rankdir="LR" node [shape=record fontname="monospace" fontsize=10] edge [fontname="monospace" fontsize=9] "Integer_Literal" [style=filled fillcolor="#eeeeec" label="{Integer_Literal|{<Value> Value|<Literal_Length> Literal_Length|<Literal_Origin> Literal_Origin|<Type> Type|<Expr_Staticness> Expr_Staticness}}"] "Integer_Literal__Literal_Origin" [shape=box label="Iir"] "Integer_Literal":Literal_Origin -> "Integer_Literal__Literal_Origin" [color="#000000"] "Integer_Literal__Type" [shape=box label="Iir"] "Integer_Literal":Type -> "Integer_Literal__Type" [color="#3465a4" style=dashed] }

Iir_Kind_Floating_Point_Literal

Format: Short

Accessor

Field

Type

Access

Description

Fp_Value

Field4

Fp64

owned

The value of the literal.

Literal_Length

Field0

Int32

owned

Length of the literal in characters. Used for pretty print. Set to 0 when doesn’t come from the sources.

Literal_Origin

Field2

Iir

owned

The origin of a literal can be null_iir for a literal generated by the parser, or a node which was statically evaluated to this literal. Such nodes are created by eval_expr.

Type

Field1

Iir

ref

Expr_Staticness

State1

Iir_Staticness

owned

Expression staticness, defined by rules of LRM 7.4

digraph { rankdir="LR" node [shape=record fontname="monospace" fontsize=10] edge [fontname="monospace" fontsize=9] "Floating_Point_Literal" [style=filled fillcolor="#eeeeec" label="{Floating_Point_Literal|{<Fp_Value> Fp_Value|<Literal_Length> Literal_Length|<Literal_Origin> Literal_Origin|<Type> Type|<Expr_Staticness> Expr_Staticness}}"] "Floating_Point_Literal__Literal_Origin" [shape=box label="Iir"] "Floating_Point_Literal":Literal_Origin -> "Floating_Point_Literal__Literal_Origin" [color="#000000"] "Floating_Point_Literal__Type" [shape=box label="Iir"] "Floating_Point_Literal":Type -> "Floating_Point_Literal__Type" [color="#3465a4" style=dashed] }

Iir_Kind_Null_Literal

The null literal, which can be a disconnection or a null access.

Format: Short

Accessor

Field

Type

Access

Description

Type

Field1

Iir

ref

Expr_Staticness

State1

Iir_Staticness

owned

Expression staticness, defined by rules of LRM 7.4

digraph { rankdir="LR" node [shape=record fontname="monospace" fontsize=10] edge [fontname="monospace" fontsize=9] "Null_Literal" [style=filled fillcolor="#eeeeec" label="{Null_Literal|{<Type> Type|<Expr_Staticness> Expr_Staticness}}"] "Null_Literal__Type" [shape=box label="Iir"] "Null_Literal":Type -> "Null_Literal__Type" [color="#3465a4" style=dashed] }

Iir_Kind_String_Literal8

Format: Short

Accessor

Field

Type

Access

Description

String_Length

Field4

Int32

owned

Number of literals in the expanded string.

String8_Id

Field5

String8_Id

owned

Before analysis, this is the ASCII code of each character in the string. After analysis, this is the position of each literal.

Literal_Length

Field0

Int32

owned

Number of characters in the string literal (given by the scanner).

Literal_Origin

Field2

Iir

owned

Used for computed literals. Literal_Origin contains the expression whose value was computed during analysis and replaces the expression.

Literal_Subtype

Field3

Iir

owned

Same as Type, but marked as property of that node.

Type

Field1

Iir

ref

Bit_String_Base

Flag12

Number_Base_Type

owned

Base of the bit_string (corresponds to letters ‘b’, ‘o’, ‘d’ or ‘x’ in the base specifier).

Expr_Staticness

State1

Iir_Staticness

owned

Expression staticness, defined by rules of LRM 7.4

Has_Signed

Flag1

Boolean

owned

True if the bit string is signed, (ie letter ‘s’ is present in the base specifier).

Has_Sign

Flag2

Boolean

owned

True if the letter ‘u’ is present in the base specifier.

Has_Length

Flag3

Boolean

owned

True if the integer specifying the length is present.

digraph { rankdir="LR" node [shape=record fontname="monospace" fontsize=10] edge [fontname="monospace" fontsize=9] "String_Literal8" [style=filled fillcolor="#eeeeec" label="{String_Literal8|{<String_Length> String_Length|<String8_Id> String8_Id|<Literal_Length> Literal_Length|<Literal_Origin> Literal_Origin|<Literal_Subtype> Literal_Subtype|<Type> Type|<Bit_String_Base> Bit_String_Base|<Expr_Staticness> Expr_Staticness|<Has_Signed> Has_Signed|<Has_Sign> Has_Sign|<Has_Length> Has_Length}}"] "String_Literal8__Literal_Origin" [shape=box label="Iir"] "String_Literal8":Literal_Origin -> "String_Literal8__Literal_Origin" [color="#000000"] "String_Literal8__Literal_Subtype" [shape=box label="Iir"] "String_Literal8":Literal_Subtype -> "String_Literal8__Literal_Subtype" [color="#000000"] "String_Literal8__Type" [shape=box label="Iir"] "String_Literal8":Type -> "String_Literal8__Type" [color="#3465a4" style=dashed] }

Iir_Kind_Physical_Int_Literal

Format: Short

Accessor

Field

Type

Access

Description

Value

Field4

Int64

owned

The multiplicand.

Unit_Name

Field3

Iir

owned

The name of the physical unit.

Literal_Length

Field0

Int32

owned

Length of the literal in characters. Used for pretty print. Set to 0 when doesn’t come from the sources.

Literal_Origin

Field2

Iir

owned

The origin of a literal can be null_iir for a literal generated by the parser, or a node which was statically evaluated to this literal. Such nodes are created by eval_expr.

Type

Field1

Iir

ref

Expr_Staticness

State1

Iir_Staticness

owned

Must be set to locally except for time literal, which is globally.

digraph { rankdir="LR" node [shape=record fontname="monospace" fontsize=10] edge [fontname="monospace" fontsize=9] "Physical_Int_Literal" [style=filled fillcolor="#eeeeec" label="{Physical_Int_Literal|{<Value> Value|<Unit_Name> Unit_Name|<Literal_Length> Literal_Length|<Literal_Origin> Literal_Origin|<Type> Type|<Expr_Staticness> Expr_Staticness}}"] "Physical_Int_Literal__Unit_Name" [shape=box label="Iir"] "Physical_Int_Literal":Unit_Name -> "Physical_Int_Literal__Unit_Name" [color="#000000"] "Physical_Int_Literal__Literal_Origin" [shape=box label="Iir"] "Physical_Int_Literal":Literal_Origin -> "Physical_Int_Literal__Literal_Origin" [color="#000000"] "Physical_Int_Literal__Type" [shape=box label="Iir"] "Physical_Int_Literal":Type -> "Physical_Int_Literal__Type" [color="#3465a4" style=dashed] }

Iir_Kind_Physical_Fp_Literal

Format: Short

Accessor

Field

Type

Access

Description

Fp_Value

Field4

Fp64

owned

The multiplicand.

Unit_Name

Field3

Iir

owned

The name of the physical unit.

Literal_Length

Field0

Int32

owned

Length of the literal in characters. Used for pretty print. Set to 0 when doesn’t come from the sources.

Literal_Origin

Field2

Iir

owned

The origin of a literal can be null_iir for a literal generated by the parser, or a node which was statically evaluated to this literal. Such nodes are created by eval_expr.

Type

Field1

Iir

ref

Expr_Staticness

State1

Iir_Staticness

owned

Must be set to locally except for time literal, which is globally.

digraph { rankdir="LR" node [shape=record fontname="monospace" fontsize=10] edge [fontname="monospace" fontsize=9] "Physical_Fp_Literal" [style=filled fillcolor="#eeeeec" label="{Physical_Fp_Literal|{<Fp_Value> Fp_Value|<Unit_Name> Unit_Name|<Literal_Length> Literal_Length|<Literal_Origin> Literal_Origin|<Type> Type|<Expr_Staticness> Expr_Staticness}}"] "Physical_Fp_Literal__Unit_Name" [shape=box label="Iir"] "Physical_Fp_Literal":Unit_Name -> "Physical_Fp_Literal__Unit_Name" [color="#000000"] "Physical_Fp_Literal__Literal_Origin" [shape=box label="Iir"] "Physical_Fp_Literal":Literal_Origin -> "Physical_Fp_Literal__Literal_Origin" [color="#000000"] "Physical_Fp_Literal__Type" [shape=box label="Iir"] "Physical_Fp_Literal":Type -> "Physical_Fp_Literal__Type" [color="#3465a4" style=dashed] }