pyGHDL.libghdl.vhdl.scanner
#
Variables
Functions
Set_File()
: Initialize the scanner with fileSourceFile
.Close_File()
: Finalize the scanner.Scan()
: Get a new token.Get_Current_Line()
: Get the current location, or the location of the current token.Get_Token_Offset()
: Get the current token’s offset in the current line.Get_Token_Position()
: Get the current token’s position.Get_Position()
: Get the current position.Current_Identifier()
: WhenCurrent_Token
is an
Variables
- pyGHDL.libghdl.vhdl.scanner.Current_Token#
c_int(0)
- pyGHDL.libghdl.vhdl.scanner.Flag_Comment#
c_bool(False)
Functions
- pyGHDL.libghdl.vhdl.scanner.Set_File(SourceFile)[source]#
Initialize the scanner with file
SourceFile
.
- pyGHDL.libghdl.vhdl.scanner.Get_Current_Line()[source]#
Get the current location, or the location of the current token.
Since a token cannot spread over lines, file and line of the current token are the same as those of the current position. The offset is the offset in the current line.
- Return type:
- Returns:
Current token’s line.
- pyGHDL.libghdl.vhdl.scanner.Get_Token_Offset()[source]#
Get the current token’s offset in the current line.
- Return type:
- Returns:
Current token’s offset.
- pyGHDL.libghdl.vhdl.scanner.Get_Token_Position()[source]#
Get the current token’s position.
- Return type:
- Returns:
Current token’s position. Type:
Source_Ptr
- pyGHDL.libghdl.vhdl.scanner.Get_Position()[source]#
Get the current position.
- Return type:
- Returns:
Current position. Type:
Source_Ptr
- pyGHDL.libghdl.vhdl.scanner.Current_Identifier()[source]#
When
Current_Token
is antok_identifier
,tok_char
ortok_string
, its name_id can be retrieved via this function.