pyGHDL.libghdl.vhdl.scanner#

Variables

Functions


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.

Parameters:

SourceFile (TypeVar(SourceFileEntry, bound= c_uint)) – File to scan.

Return type:

None

pyGHDL.libghdl.vhdl.scanner.Close_File()[source]#

Finalize the scanner.

Return type:

None

pyGHDL.libghdl.vhdl.scanner.Scan()[source]#

Get a new token.

Return type:

None

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:

int

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:

int

Returns:

Current token’s offset.

pyGHDL.libghdl.vhdl.scanner.Get_Token_Position()[source]#

Get the current token’s position.

Return type:

int

Returns:

Current token’s position. Type: Source_Ptr

pyGHDL.libghdl.vhdl.scanner.Get_Position()[source]#

Get the current position.

Return type:

int

Returns:

Current position. Type: Source_Ptr

pyGHDL.libghdl.vhdl.scanner.Current_Identifier()[source]#

When Current_Token is an tok_identifier, tok_char or tok_string, its name_id can be retrieved via this function.

Return type:

TypeVar(NameId, bound= c_int)

Returns:

NameId of the current token.