Giter Site home page Giter Site logo

Comments (5)

masatake avatar masatake commented on June 16, 2024

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.

AmaiKinono avatar AmaiKinono commented on June 16, 2024

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.

masatake avatar masatake commented on June 16, 2024

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.

thisissvikas avatar thisissvikas commented on June 16, 2024

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.

masatake avatar masatake commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.