llcppg design
This commit is contained in:
@@ -17,10 +17,11 @@ If `config-file` is not specified, a `llcppg.cfg` file is used in current direct
|
|||||||
"INIReader.h",
|
"INIReader.h",
|
||||||
"AnotherHeaderFile.h"
|
"AnotherHeaderFile.h"
|
||||||
],
|
],
|
||||||
"libs": "$(pkg-config --libs inireader)"
|
"libs": "$(pkg-config --libs inireader)",
|
||||||
|
"trimPrefixes": ["Ini", "INI"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Design
|
## Design
|
||||||
|
|
||||||
See [Design of llcppg](design.md).
|
See [llcppg Design](design.md).
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Design of llcppg
|
llcppg Design
|
||||||
=====
|
=====
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -11,13 +11,14 @@ If `config-file` is not specified, a `llcppg.cfg` file is used in current direct
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name": "inireader",
|
"name": "inih",
|
||||||
"cflags": "$(pkg-config --cflags inireader)",
|
"cflags": "$(pkg-config --cflags inireader)",
|
||||||
"include": [
|
"include": [
|
||||||
"INIReader.h",
|
"INIReader.h",
|
||||||
"AnotherHeaderFile.h"
|
"AnotherHeaderFile.h"
|
||||||
],
|
],
|
||||||
"libs": "$(pkg-config --libs inireader)"
|
"libs": "$(pkg-config --libs inireader)",
|
||||||
|
"trimPrefixes": ["Ini", "INI"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -33,9 +34,10 @@ If `config-file` is not specified, a `llcppg.cfg` file is used in current direct
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
llcppsymg config-file
|
llcppsymg config-file
|
||||||
|
llcppsymg - # read config from stdin
|
||||||
```
|
```
|
||||||
|
|
||||||
It generates symbol tables. Its file format is as follows:
|
It generates a symbol table file named `llcppg.symb.json`. Its file format is as follows:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
@@ -44,9 +46,31 @@ It generates symbol tables. Its file format is as follows:
|
|||||||
"c++": "INIReader::INIReader(char const*, unsigned long)",
|
"c++": "INIReader::INIReader(char const*, unsigned long)",
|
||||||
"go": "(*Reader).Init__0"
|
"go": "(*Reader).Init__0"
|
||||||
},
|
},
|
||||||
|
...
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### llcppsigfetch
|
||||||
|
|
||||||
|
```sh
|
||||||
|
llcppsigfetch config-file
|
||||||
|
llcppsigfetch - # read config from stdin
|
||||||
|
```
|
||||||
|
|
||||||
|
It fetches information of C/C++ symbols and print to stdout. Its format is as follows:
|
||||||
|
|
||||||
|
```json
|
||||||
|
TODO: see llgo/xtool/clang/ast
|
||||||
|
```
|
||||||
|
|
||||||
|
### gogensig
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gogensig ast-file
|
||||||
|
gogensig - # read AST from stdin
|
||||||
|
```
|
||||||
|
|
||||||
## Overall
|
## Overall
|
||||||
|
|
||||||
### Process
|
### Process
|
||||||
|
|||||||
Reference in New Issue
Block a user