1

Addressing inside files is my main concern. We can address XML documents using XPATH. Is there similar addressing mechanisms for programming languages atleast for C or C++? is there somehow I can use the cross referencing tools to generate data which can be used to address inside files, like what ctags do?

vanangamudi
  • 673
  • 1
  • 8
  • 21
  • Generally speaking, what you seem to be looking for is a *database*. Simple databases are not that hard to make though, you have already mentioned one such simple dabase-mechanism: ctags. Just create some kind of index for the main file, then just look through the index to find the item you want, and you have the position in the data-file. – Some programmer dude Aug 01 '15 at 14:31
  • What exactly do you mean? XPath can be used to provide a path to some element/attribute in XML, do you mean like that, but for C/C++ source files, e.g. an extension over just saying "mynamespace::MyClass::mymember" with clear handling of declaration/defintiion, overloads, typedef's, etc. with an engine to locate the requested source line? Similar to what you might get in an IDE when you use a "Go to Definition/Declaration" feature? – Fire Lancer Aug 01 '15 at 15:04
  • I don't know about C and C++ and your text asks about XPath only, but as you also have used the `dom` tag, some .NET languages like C# and VB.NET have CodeDOM https://msdn.microsoft.com/en-us/library/y2k85ax6%28v=vs.110%29.aspx. – Martin Honnen Aug 01 '15 at 15:58
  • So i would have to write parsers for required programming languages and store the constructs and their relationship information in a database. There is no tool available with similar kind of fucntionality that I can exploit? – vanangamudi Aug 01 '15 at 16:39

0 Answers0