• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

B.10 Hooks for loading files
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Hackers corner
        • Hooks for loading files
          • prolog_load_file/2
          • open_source_hook/3
          • comment_hook/3
    • Packages
Sourceprolog:comment_hook(+Comments, +Pos, +Term)
This hook allows for processing comments encountered by the compiler. If this hook is defined, the compiler calls read_term/2 with the option comments(Comments). If the list of comments returned by read_term/2 is not empty it calls this comment hook with the following arguments.

  • Comments is the non-empty list of comments. Each comment is a pair Position-String, where String is a string object (see section 5.2) that contains the comment including delimiters. Consecutive line comments are returned as a single comment.
  • Pos is a stream-position term that describes the starting position of Term
  • Term is the term read.

This hook is exploited by the documentation system. See stream_position_data/3. See also read_term/3.

ClioPatria (version V3.1.1-51-ga0b30a5)