Universal Ctags
latest
  • Building ctags
  • Man pages
  • Parsers
  • Option files
  • Output formats
  • Running multiple parsers on an input file
  • Interactive mode
  • Other changes
  • Extending ctags with Regex parser (optlib)
  • Optscript, a programming language for extending optlib parsers
  • Extending ctags with a parser written in C
    • Writing a parser in C
    • Input text stream
    • Output tag stream
    • tokenInfo API
    • Multiple parsers
    • PackCC compiler-compiler
    • Automatic parser guessing (TBW)
    • Managing regular expression parsers (TBW)
    • Ghost kind in regex parser (TBW)
  • Testing ctags
  • Testing a parser
  • Testing readtags
  • Request for extending a parser (or Reporting a bug of parser)
  • Contributions
  • How to release a new version
  • Relationship between other projects
  • Who we are
Universal Ctags
  • Docs »
  • Extending ctags with a parser written in C
  • Edit on GitHub

Extending ctags with a parser written in CΒΆ

This chapter describes how to add a parser in C and the internal API of Universal Ctags.

Before you start writing a parser in C, consider using optlib parser. Universal Ctags extends the functionality so extensively that it can implement most of functionality for the parser. See ctags-optlib(7) and Extending ctags with Regex parser (optlib) for details.

optlib parser is also suitable for prototyping of a parser in C.

  • Writing a parser in C
    • Registering a parser
    • Reading input file stream
    • Parsing
    • Adding a tag to the tag file
    • Adding the parser to ctags
    • Misc.
  • Input text stream
    • inputFile type and the functions of input group
    • The functions of bypass group
    • The functions of raw group
    • Escaping and unescaping input fields
  • Output tag stream
    • cork API
      • Background and Idea
      • How to use
      • Automatic full qualified tag generation
      • symbol table API
  • tokenInfo API
  • Multiple parsers
    • Guest parser (promise API)
      • Background and Idea
      • Usage
      • Internal design
    • API for subparser
      • Outline
      • Fields of subparser type
      • Extending subparser type
      • Making a tag in a subparser
      • Calling methods of subparsers from a base parser
      • Registering a subparser to its base parser
      • Scheduling running the base parser
  • PackCC compiler-compiler
  • Automatic parser guessing (TBW)
  • Managing regular expression parsers (TBW)
  • Ghost kind in regex parser (TBW)
Next Previous

© Copyright 2015-2022, Universal Ctags Team Revision 1901123c.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
doc-revise
doc-fix
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.