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

/opt/project/cpack/swish/lib/swish/highlight.pl
AllApplicationManualNameSummaryHelp

  • lib
    • swish
      • messages.pl
      • paths.pl -- Setup SWISH search paths
      • config.pl -- Make HTTP locations known to JSON code
      • page.pl -- Provide the SWISH application as Prolog HTML component
      • help.pl -- SWISH help system
      • search.pl -- SWISH search from the navigation bar
      • chat.pl -- The SWISH collaboration backbone
      • storage.pl -- Store files on behalve of web clients
      • gitty.pl -- Single-file GIT like version system
      • gitty_driver_bdb.pl -- Gitty BDB driver
      • gitty_driver_files.pl -- Gitty plain files driver
      • patch.pl -- Run patch program
      • authenticate.pl -- Authentication access for SWISH
      • pep.pl -- SWISH PEP (Policy Enforcement Point)
      • avatar.pl -- Avatar management
      • noble_avatar.pl -- Noble Avatar generator
      • chatstore.pl -- Store chat messages
      • content_filter.pl -- Ban list content filter
      • include.pl -- Support :- include(File) from SWISH
      • swish_csv.pl -- Support CSV output from a Pengines server
      • examples.pl -- Serve example files
      • profiles.pl
      • highlight.pl -- Highlight token server
        • config/2
        • swish_config/2
        • xref_open_source/2
        • current_highlight_state/2
        • css/3
        • token_info//1
      • markdown.pl -- SWISH Notebook markdown support
      • render.pl -- SWISH term-rendering support
      • template_hint.pl -- Generate template hints for CondeMirror
      • trace.pl --
      • projection.pl -- Define the projection
      • jquery.pl -- Call jQuery on the SWISH interface
      • dashboard.pl -- Provide non-programmer query execution
      • bootstrap.pl -- Bootstrap form generator
      • form.pl -- Form handling utilities
      • cp_authenticate.pl -- SWISH login management
      • logging.pl -- Add SWISH query execution to the HTTP log file
      • r_swish.pl
      • download.pl -- Provide data for downloading
      • swish_debug.pl
      • procps.pl
 style(+StyleIn) is semidet[multifile, wordlist(highlight)]
 style(+StyleIn, -SWISHType:atomOrPair, -Attributes:list)[multifile, wordlist(highlight)]
Declare that we map StyleIn as generated by library(prolog_colour) into a token of type SWISHType, providing additional context information based on Attributes. Elements of Attributes are terms of the form Name(Value) or the atom text. The latter is mapped to text(String), where String contains the text that matches the token character range.

The resulting JSON token object has a property type, containing the SWISHType and the properties defined by Attributes.

Additional translations can be defined by adding rules for the multifile predicate style/3. The base type, which refers to the type generated by the SWISH tokenizer must be specified by adding an attribute base(BaseType). For example, if the colour system classifies an atom as refering to a database column, library(prolog_colour) may emit db_column(Name) and the following rule should ensure consistent mapping:

swish_highlight:style(db_column(Name),
                      db_column, [text, base(atom)]).
ClioPatria (version V3.1.1-40-g9d9e003)