From 159e0bfdbb135e74aac10e54c7a499e9e34aa5a2 Mon Sep 17 00:00:00 2001 From: 1138-4EB <1138-4EB@users.noreply.github.com> Date: Mon, 17 Jun 2019 03:38:27 +0200 Subject: Rework libghdl build/install procedure (#840) * feat(libghdl): add libghdl_pkg.py, add option to generate libghdl-py.tgz with dist/travis/build.sh * libghdl*.so is now part of GHDL * move python sources to python/libghdl and python/pnodes * rename src/vhdl/python to src/vhdl/libghdl * add generation of tarball for libghdl-py to the makefile * deprecate --enable-python and --disable-python * add configuration option --disable-libghdl * feat(python/libghdl): add support for LIBGHDL_PREFIX (#844) * fix(travis): disable libghdl on mac * feat(python/libghdl): add support for GHDL_BIN_PATH and VUNIT_GHDL_PATH --- python/libghdl/thin/vhdl/scanner.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 python/libghdl/thin/vhdl/scanner.py (limited to 'python/libghdl/thin/vhdl/scanner.py') diff --git a/python/libghdl/thin/vhdl/scanner.py b/python/libghdl/thin/vhdl/scanner.py new file mode 100644 index 000000000..8cea66ba3 --- /dev/null +++ b/python/libghdl/thin/vhdl/scanner.py @@ -0,0 +1,23 @@ +from libghdl import libghdl +from ctypes import c_int, c_bool + +Set_File = libghdl.vhdl__scanner__set_file + +Close_File = libghdl.vhdl__scanner__close_file + +Scan = libghdl.vhdl__scanner__scan + +# This is a c_int, so you want to use its .value +Current_Token = c_int.in_dll(libghdl, "vhdl__scanner__current_token") + +Flag_Comment = c_bool.in_dll(libghdl, "vhdl__scanner__flag_comment") + +Get_Current_Line = libghdl.vhdl__scanner__get_current_line + +Get_Token_Offset = libghdl.vhdl__scanner__get_token_offset + +Get_Token_Position = libghdl.vhdl__scanner__get_token_position + +Get_Position = libghdl.vhdl__scanner__get_position + +Current_Identifier = libghdl.vhdl__scanner__current_identifier -- cgit v1.2.3