Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cedlemo/lua-truckboris
Lua bindings for the truckboris library
https://github.com/cedlemo/lua-truckboris
Last synced: 14 days ago
JSON representation
Lua bindings for the truckboris library
- Host: GitHub
- URL: https://github.com/cedlemo/lua-truckboris
- Owner: cedlemo
- Created: 2015-11-03T10:20:59.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-04T17:17:42.000Z (about 9 years ago)
- Last Synced: 2024-10-04T22:16:12.998Z (about 1 month ago)
- Language: C++
- Size: 176 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lua Truckboris
lua bindings to the truckboris library. (https://github.com/cedlemo/truckboris)
```lua
local truckboris = require("truckboris")local parser = truckboris.HeaderParser()
parser:add_source_file("./test_cpp")
parser:add_search_path("/usr/include")has_worked = parser:parse()
if has_worked == true then
print("Parsing has worked")
endlocal functions = {}
for i = 1, parser:functions_num(), 1 do
functions[i] = parser:get_nth_function(i - 1)
endfor _,f in ipairs(functions) do
print("Name : " .. f:name() )
print("\tReturn : " .. f:return_type():name())
local params = {}
for j = 1, f:parameters_num(), 1 do
params[j] = f:get_nth_parameter(j-1)
endfor _,p in ipairs(params) do
print("\t\tParam : ".. p:type():name() .. " " .. p:name())
end
end
```# Build:
## Standard:
The autotools will detect automaticaly your lua version
and install the library in a path build on the prefix variable../autogen.sh --prefix=/usr
make
sudo make installThe library files will be isntalled in /usr/lib/lua/LUA_VERSION/trucboris.
## Custom directory:
You can still use the *libdir* variable. If your current version of lua
is 5.3 for example:./autogen.sh --libdir=/usr/lib/lua/5.3
make
sudo make install# Clean:
sudo make uninstall
make maintainer clean