Skip to content

Movable is a DSL for description tokens which convert by Scie.

Notifications You must be signed in to change notification settings

datum-lang/movable

Repository files navigation

Movable

CI

Movable (from Movable Type(in Chinese: 活字印刷术)) is a intermedia DSL for description tokens which convert by Scie.

  • structure organization
  • inheritance
  • structure generate
  • template transpile

Typography

Typography is a DSL-base parser for build common AST. features:

  • extends
  • data struct binding
  • template match

Syntax

// options for movable config
options {
  name  -> "c";
}

// default tokenizer for extends
define default$tokenizer {
  identifier: [a-zA-Z_];
}

// define tokenizer rules
tokenizer extends default$tokenizer {
   ...
}

// define rule
rule <ruleName> {
    ...
}

// ast for generate code
// todo: for future
ast {
  node parameters {
    parameters parameter*;
  }
}

Movable

Movable is a DSL for save convert DSL to common HIR or MIR.

  • Tier 1. HIR, Java, JavaScript, Golang
  • Tier 2. MIR, C/C++, Rust

HIR

Todo, thinking in based Python Bytecode.

MIR or Sir

todo: thinking based on https://github.com/vnmakarov/mir

  • modules
    • functions
      • signature
      • local variables
        • type
      • instructions
        • opcode
          • immediate
            • 64-bit integer
            • float
            • double
            • long double
          • memory
            • type
            • displacement
          • label
          • reference
        • operands

Modernize

Modernization is working for convert Movable generated code to Languages.

Contributors

About

Movable is a DSL for description tokens which convert by Scie.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages