Skip to content

Front-end libraries and utilities for the Transmuter language processing infrastructure

License

Notifications You must be signed in to change notification settings

transmuter-lp/front

Repository files navigation

Transmuter front-end

Front-end libraries and utilities for the Transmuter language processing infrastructure.

Features

  • Aether -- a self-declared language declaration language
  • Conditional declaration of language features

Lexical Analyzer

  • POSIX ERE-based language
  • NFA-based implementation
  • O(n) complexity
  • Ignorable tokens (for eg. comments, newlines and whitespaces)
  • On-demand and memoized tokenization
  • Longest match tokenization
    • Ambiguous generalization as workaround
  • Ambiguous tokenization
    • Precedence-based disambiguation

Syntactic Analyzer

  • Generalized CFG-based language (including ambiguities and left-recursion)
  • Recursive Descent-based implementation (using backtracking instead of lookahead)
    • Memoized parsing
  • O(n^3) complexity
  • Recursive Ascent-based left-recursion implementation
    • Iteration-based alternative to (left-)recursion
  • SPACE(n^3) ambiguous BSR-based output
    • Ordered choice and longest match-based disambiguation
  • Syntax sugar for optionals and expression grouping

Semantic Analyzer

  • Dual BSR / Syntax Tree APIs
    • Visitors and transformers
    • BSR <-> Syntax Tree converters
  • Symbol Table

Licensing

This codebase is licensed under the GNU GPL version 3 or any later version. Since the code generated by this codebase makes use of this codebase as a library, itself and its source Aether files must both be licensed under a compatible license.

References