Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4505

Generic config file parsing that works

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • sometime
    • Cleanup, Core, Management API
    • None

    Description

      We have a big mess in config file parsing.

      The management API uses ./mgmt/api/GenericParser.* to parse mostly generic key=value syntax, but nothing calls those APIs. We should remove them.

      Internally, other files are parsed by hand (each with a different set of bugs) or by using parseConfigLine, which was not really intended for generic parsing and has a kind of crappy interface.

      What we need is to nuke all this code and have a single interface for parsing files sanely. The top level parser maps a file and emits a stream of lines. This should support comments, empty line elision and line continuations. Each line should come with a SourceLocation object for error messages. The stream of lines is consumed by a key=value tokenizer that each subsystem digests. This would be broadly similar to the GenericParser stuff.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jamespeach James Peach
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: