Comments (5)
ctags is a command. Therefore there is no way to access the memory address space of your program.
You have to copy & paste ctags code into your program to use the feature of ctags in your program.
Here is an example.
https://github.com/universal-ctags/ctags/blob/master/main/mini-geany.c
from issues-we-will-not-fix-in-soon.
My thought is we can use a named pipe for this, like:
$ mkfifo /tmp/test.c
$ printf "int a;\n" > /tmp/test.c &
[1] 3278
$ ctags -f- /tmp/test.c
(no output)
$ cat /tmp/test.c
int a;
[1]+ Done printf "int a;\n" > /tmp/test.c
But this doesn't work. Seems ctags didn't consume the content in that pipe. @masatake do you know why?
from issues-we-will-not-fix-in-soon.
eStat() defined in main/routines.c verifies whether the input file is a regular file or not.
ctags expects the input is "seekable". The pipe is not seekable.
If you want to use ctags in that way, you may have interests in --_interactive option described in https://docs.ctags.io/en/latest/interactive-mode.html.
from issues-we-will-not-fix-in-soon.
It would be nice if there was a way to parse the files in memory. For example, the use case can be if I am trying to walk through a git repo and read its files in memory and then parse them and get the required details from them rather than having to check out the repo to do the same.
Is there any way as of now to achieve the above-mentioned use case?
from issues-we-will-not-fix-in-soon.
Feel free to fork this repository to parse the contents on the memory.
We don't have enough resources to maintain the API for the purpose. Moreover, I don't have enough skill to design the API for the purpose. mini-geany.c is very special. It is for people who know C tags very well.
from issues-we-will-not-fix-in-soon.
Related Issues (8)
- Tag Lookup Help / Feature Request HOT 4
- Add a way to write the position/column to tags file HOT 5
- [Feature Request] Avoid comments in tag search pattern HOT 1
- ctags update tags only for updated files HOT 4
- Plugins/hooks inside ctags pipeline processing HOT 1
- Incremental update of huge tags db -- parse the VCS diff HOT 1
- Bug: null chars in input stream HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from issues-we-will-not-fix-in-soon.