raph-amiard / ada-python-interfacing Goto Github PK
View Code? Open in Web Editor NEWSimple example of how to automatically interface Ada and Python
Simple example of how to automatically interface Ada and Python
I am not knowledgeable in C type definitions to fix the following:
PS C:\Users\olivi\Desktop\ada_task_tests\ada_interface_python\ada-python-interfacing> python test.py
C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\cffi\cparser.py:153: UserWarning: String literal found in cdef() or type source. String literals are ignored here, but you should remove them anyway because some character sequences confuse pre-parsing.
warnings.warn("String literal found in cdef() or type source. "
Traceback (most recent call last):
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\cffi\cparser.py", line 305, in _parse
ast = _get_parser().parse(fullcsource)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\pycparser\c_parser.py", line 152, in parse
debug=debuglevel)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\pycparser\ply\yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\pycparser\ply\yacc.py", line 1199, in parseopt_notrack
tok = call_errorfunc(self.errorfunc, errtoken, self)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\pycparser\ply\yacc.py", line 193, in call_errorfunc
r = errorfunc(token)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\pycparser\c_parser.py", line 1848, in p_error
column=self.clex.find_tok_column(p)))
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\pycparser\plyparser.py", line 67, in _parse_error
raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: c:\\gnat\\2019\\x86_64-pc-mingw32\\include\\vadefs.h:24:28: before: __gnuc_va_list
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 6, in <module>
ffi.cdef(f.read())
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\cffi\api.py", line 112, in cdef
self._cdef(csource, override=override, packed=packed, pack=pack)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\cffi\api.py", line 126, in _cdef
self._parser.parse(csource, override=override, **options)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\cffi\cparser.py", line 358, in parse
self._internal_parse(csource)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\cffi\cparser.py", line 363, in _internal_parse
ast, macros, csource = self._parse(csource)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\cffi\cparser.py", line 307, in _parse
self.convert_pycparser_error(e, csource)
File "C:\Users\olivi\AppData\Local\Programs\Python\Python37\lib\site-packages\cffi\cparser.py", line 336, in convert_pycparser_error
raise CDefError(msg)
cffi.CDefError: parse error
c:\\gnat\\2019\\x86_64-pc-mingw32\\include\\vadefs.h:24:28: before: __gnuc_va_list
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.