All Projects → xieyuheng → tangle-rs

xieyuheng / tangle-rs

Licence: GPL-3.0 license
a collection of tools to do tangle in rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to tangle-rs

Compiler-written-in-Haskell
A Turing complete language 😉
Stars: ✭ 31 (+34.78%)
Mutual labels:  parsing
wrangler
Wrangler Transform: A DMD system for transforming Big Data
Stars: ✭ 63 (+173.91%)
Mutual labels:  parsing
ob-tmux
Ob-tmux is an Emacs library that allows org mode to evaluate code blocks in a tmux session.
Stars: ✭ 46 (+100%)
Mutual labels:  org-mode
vimwiki2org
Convert VimWiki files to Emacs Org-Mode
Stars: ✭ 18 (-21.74%)
Mutual labels:  org-mode
cvscan
Your not so typical resume parser
Stars: ✭ 46 (+100%)
Mutual labels:  parsing
http-accept
Parse Accept and Accept-Language HTTP headers in Ruby.
Stars: ✭ 69 (+200%)
Mutual labels:  parsing
sword-to-org
Convert Sword modules to Org-mode outlines
Stars: ✭ 32 (+39.13%)
Mutual labels:  org-mode
octet
A library that makes working with bytebuffers painless.
Stars: ✭ 79 (+243.48%)
Mutual labels:  parsing
org-onenote
Post org file to onenote
Stars: ✭ 40 (+73.91%)
Mutual labels:  org-mode
PSStringScanner
Provides lexical scanning operations on a String
Stars: ✭ 45 (+95.65%)
Mutual labels:  parsing
librxvm
non-backtracking NFA-based regular expression library, for C and Python
Stars: ✭ 57 (+147.83%)
Mutual labels:  parsing
org-agda-mode
An Emacs mode for working with Agda code in an Org-mode like fashion, more or less.
Stars: ✭ 14 (-39.13%)
Mutual labels:  org-mode
attach-juxtapose-parser
Code for the paper "Strongly Incremental Constituency Parsing with Graph Neural Networks"
Stars: ✭ 25 (+8.7%)
Mutual labels:  parsing
Singulink.IO.FileSystem
Reliable cross-platform strongly-typed file/directory path manipulation and file system access in .NET.
Stars: ✭ 16 (-30.43%)
Mutual labels:  parsing
emacs-up
My emacs configuration files
Stars: ✭ 23 (+0%)
Mutual labels:  org-mode
kataw
An 100% spec compliant ES2022 JavaScript toolchain
Stars: ✭ 303 (+1217.39%)
Mutual labels:  parsing
memology
Memes - why so popular?
Stars: ✭ 32 (+39.13%)
Mutual labels:  parsing
siemstress
Very basic CLI SIEM (Security Information and Event Management system).
Stars: ✭ 24 (+4.35%)
Mutual labels:  parsing
JuCC
JuCC - Jadavpur University Compiler Compiler
Stars: ✭ 34 (+47.83%)
Mutual labels:  parsing
bracer
Java library for parsing and evaluating math expressions
Stars: ✭ 18 (-21.74%)
Mutual labels:  parsing

tangle in rust

A collection of tools to do tangle in rust.

Getting Start

To build the program, nightly rust toolchain is needed.

rustup is the tool to help programmers install rust toolchains.

Then do:

rustup install nightly
cargo +nightly install tangle-cli --git https://github.com/xieyuheng/tangle-rs

org-mode

In a .org file

  • Add tangle property-line
#+property: tangle lib.rs
  • The following code block will be tangled into lib.rs
#+begin_src rust
fn tangle (string: &str) -> Result <String, TangleError> {
    let mut result = String::new ();
    let mut lines = string.lines ();
    while let Some (line) = lines.next () {
        if block_begin_line_p (line) {
            tangle_collect (&mut result, &mut lines)?;
        }
    }
    Ok (result)
}
#+end_src

Note About Restriction on org-mode

  • The use case is restricted to global tangle property-line
    • code block level tangle property-line is NOT supported
    • headline level tangle property-line is NOT supported

Check out https://github.com/OrgTangle for alternative tangle support.

Markdown

In a .md file

  • Add tangle property-line
---
tangle: lib.rs
---
  • The following code block will be tangled into lib.rs
``` rust
fn tangle (string: &str) -> Result <String, TangleError> {
    let mut result = String::new ();
    let mut lines = string.lines ();
    while let Some (line) = lines.next () {
        if block_begin_line_p (line) {
            tangle_collect (&mut result, &mut lines)?;
        }
    }
    Ok (result)
}
```

Contributing

We enforce C4 as collaboration protocol :

Code Of Conduct

License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].