diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-10-18 05:42:47 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-18 05:42:47 +0200 |
commit | 8d2bc284f030ab3ade000f11520dfbf9d8995c69 (patch) | |
tree | 494ae66cf7266fe8e173a3e0a7d77b418788a89a /src/vhdl/python | |
parent | 95bbe2124734f4687e37455d6efb7935a0ee97a3 (diff) | |
download | ghdl-8d2bc284f030ab3ade000f11520dfbf9d8995c69.tar.gz ghdl-8d2bc284f030ab3ade000f11520dfbf9d8995c69.tar.bz2 ghdl-8d2bc284f030ab3ade000f11520dfbf9d8995c69.zip |
Add extended locations (elocations). Still WIP
Diffstat (limited to 'src/vhdl/python')
-rw-r--r-- | src/vhdl/python/libghdl/thin.py | 5 | ||||
-rwxr-xr-x | src/vhdl/python/pnodespy.py | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/vhdl/python/libghdl/thin.py b/src/vhdl/python/libghdl/thin.py index 71b375c73..07a5e80d6 100644 --- a/src/vhdl/python/libghdl/thin.py +++ b/src/vhdl/python/libghdl/thin.py @@ -77,6 +77,11 @@ def Get_Identifier(s): return _Get_Identifier_With_Len(c_char_p(s), len(s)) +# Flags +class Flags: + Flag_Elocations = c_bool.in_dll(libghdl, "flags__flag_elocations") + + # Scanner class Scanner: Set_File = libghdl.scanner__set_file diff --git a/src/vhdl/python/pnodespy.py b/src/vhdl/python/pnodespy.py index b846c01b0..d0168784c 100755 --- a/src/vhdl/python/pnodespy.py +++ b/src/vhdl/python/pnodespy.py @@ -39,6 +39,19 @@ def do_iirs_subprg(): k.name, libname, classname, k.name.lower(), k.pname, k.rname) +def do_libghdl_elocations(): + classname = 'elocations' + print 'from libghdl import libghdl' + print + for k in pnodes.funcs: + print + print 'Get_{0} = {1}.{2}__get_{3}'.format( + k.name, libname, classname, k.name.lower()) + print + print 'Set_{0} = {1}.{2}__set_{3}'.format( + k.name, libname, classname, k.name.lower(), k.pname, k.rname) + + def do_class_types(): print_enum('types', pnodes.get_types()) @@ -178,7 +191,8 @@ pnodes.actions.update({'class-kinds': do_class_kinds, 'libghdl-iirs': do_libghdl_iirs, 'libghdl-meta': do_libghdl_meta, 'libghdl-names': do_libghdl_names, - 'libghdl-tokens': do_libghdl_tokens}) + 'libghdl-tokens': do_libghdl_tokens, + 'libghdl-elocs': do_libghdl_elocations}) pnodes.main() |