Coder Social home page Coder Social logo

jhvst / scie Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datum-lang/scie

0.0 1.0 0.0 4.3 MB

基于正则表达式的通用语言转换器。An interpreter for grammar files as defined by TextMate with Rust

License: MIT License

Rust 5.10% C 0.15% Batchfile 0.01% Clojure 0.02% CoffeeScript 0.01% JavaScript 81.50% C++ 0.04% C# 0.02% TypeScript 12.41% CSS 0.05% SCSS 0.09% F# 0.01% Go 0.01% Groovy 0.05% HTML 0.02% Java 0.01% Less 0.01% Lua 0.01% Makefile 0.46% Objective-C 0.02%

scie's Introduction

Scie

CI

Scie is a research about how to build simple code identify engine for different languages.

goal: build a better code figure engine for code refactoring.

  • scie-cli. cli part of Scie.
  • scie-bingen. generate languages bin-data.
  • scie-detector. detector for different frameworks & languages.
  • scie-grammar. A library that helps tokenize text using Text Mate grammars.
  • scie-infra. common infrastructure support, like fs
  • scie-onig. Wrapper Rust Oniguruma FFI api based on rust-onig
  • scie-model. common model of VSCode models & Miao Model.
  • scie-scanner. Rewrite of VS Code Oniguruma

Usage

Scie CLI

scie-cli 0.1
Phodal HUANG<[email protected]>

USAGE:
    scie-cli [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -v, --verbose
    -V, --version    Prints version information

OPTIONS:
    -c, --config <config>    [default: default.conf]
    -p, --path <path>        [default: .]

DevSetup

  1. git clone
git clone https://github.com/phodal/scie/
  1. run
cargo run scie

install just

curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to DEST

run tests

just tests

Guideline

major issues:

  • performance
    • rule in Grammar seed in rule_container.rs
    • UTF 8 to UTF 16 in UtfString
    • normal issue
  • unstable
    • Random test failure on OnigScanner.
    • GC issues on OnigScanner.
      • GC issue seems resolved with Jemalloc.
      • Signal 6 (SIGABRT) = SIGABRT is commonly used by libc and other libraries to abort the program in case of critical errors. For example, glibc sends an SIGABRT in case of a detected double-free or other heap corruptions.
      • maybe UTF8 encoding issue

Todo:

  • replace with fancy-regex for pure Rust impl
  • process todo
    • back references
    • multiple languages
  • rewrite VSCode-textmate with Rust
    • language for testing
    • support others language
  • benchmark
    • fast than VSCode version
  • multiple languages one project support
  • analyser
    • line counts
    • keywords map

Documents

refs

License

scie-grammar based on vscode-textmate with MIT LICENSE see in scie-grammar/src/scanner/LICENSE

onigvs based on rust-onig

Phodal's Idea

@ 2020 A Phodal Huang's Idea. This code is distributed under the MPL license. See LICENSE in this directory.

scie's People

Contributors

jhvst avatar noaland avatar phodal avatar yalechen-cyw3 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.