Skip to content

Project Structure

John Ed Quinn edited this page Apr 5, 2023 · 1 revision

For most users, the only project relevant to them will be kanonic-tool.

  • kanonic-tool: generates a parser for a user's input Kanonic file
    • Internally parses an input Kanonic file into a Kanonic AST using :kanonic-syntax's parser
    • Converts the Kanonic AST into a Grammar
    • Generates the appropriate files using the parsed Grammar and :kanonic-gen

For developers, below are descriptions for the remaining sub-projects.

  • kanonic-gen
    • KanonicGenerator: given a grammar, generates the Nodes, Visitors, and Metadata
  • kanonic-runtime
    • KanonicParser: given a generated metadata, parses the input string into the generated nodes (AST)
  • kanonic-syntax: holds the official, generated Kanonic Parser/Metadata
    • Internally calls kanonic-syntax-gen's application to generate the source code and place within the Kotlin source set
  • kanonic-syntax-gen: generates Kanonic's parser and places the source in kanonic-syntax
    • Holds Kanonic's official grammar in Kotlin form
    • Very similar to kanonic-tool, but it solely used for internal purposes
Clone this wiki locally