A notation for writing trees and a parser for it
See the codeBrashtag is a notation for specifying trees. Purpose of the notation is to allow you to surround a piece of text with hints that programs can later exploit.
There are three kinds of nodes blobs, bags, codes.
The following snippet constructs tree with a bag tagged "card" that contains
two bags tagged "front" and "back". The bag tagged "front" contains a blob
with text "This is front.". The bag tagged back contains a blob with text
"This is back.".
#card{
#front{
This is front.
}
#back{
This is back.
}
}
Any text is allowed inside tags and blobs except these four characters #, {, },
` (tick).
Because these characters are also used by the notation. If you want to
put text with those characters in the tree you have to surround it by ` ticks. That creates
a node of kind code. You need to surround the code node with more ticks than maximum
number of consecutive ticks inside its text.
Following snippet constructs a code node with tag ` and func main() { fmt.Println("Hello") } text.
`
func main() { fmt.Println("Hello") }
`
And this snippet constructs a code node with tag `` and text Some `code` here. .
``
Some `code` here.
``
Hello, World!

Hello, World!
#comment{
A first program!
}

Hello, World!
#comment{
A first program!
}
Code to compute nth fibonacci number.
`
def fibs(n):
if n == 0 or n == 1:
return 1
return fibs(n-1) + fibs(n-2)
`

Hello, World!
#comment{
A first program!
}
Code to compute nth fibonacci number.
`
def fibs(n):
if n == 0 or n == 1:
return 1
return fibs(n-1) + fibs(n-2)
`
That is all.

These are quickly hacked together, unpolished programs. Making this kind of hacking easy is what this notation is invented for.
Golang:
import "github.com/pratikdeoghare/brashtag"
Python:
pip install git+https://github.com/PratikDeoghare/brashtag.git
Javascript:
npm install git+https://github.com/pratikdeoghare/brashtag.git
Go
74.2%
HTML
9.4%
Python
7.6%
JavaScript
6.9%
Makefile
1.4%
A notation for writing trees and a parser for it
See the codeBrashtag is a notation for specifying trees. Purpose of the notation is to allow you to surround a piece of text with hints that programs can later exploit.
There are three kinds of nodes blobs, bags, codes.
The following snippet constructs tree with a bag tagged "card" that contains
two bags tagged "front" and "back". The bag tagged "front" contains a blob
with text "This is front.". The bag tagged back contains a blob with text
"This is back.".
#card{
#front{
This is front.
}
#back{
This is back.
}
}
Any text is allowed inside tags and blobs except these four characters #, {, },
` (tick).
Because these characters are also used by the notation. If you want to
put text with those characters in the tree you have to surround it by ` ticks. That creates
a node of kind code. You need to surround the code node with more ticks than maximum
number of consecutive ticks inside its text.
Following snippet constructs a code node with tag ` and func main() { fmt.Println("Hello") } text.
`
func main() { fmt.Println("Hello") }
`
And this snippet constructs a code node with tag `` and text Some `code` here. .
``
Some `code` here.
``
Hello, World!

Hello, World!
#comment{
A first program!
}

Hello, World!
#comment{
A first program!
}
Code to compute nth fibonacci number.
`
def fibs(n):
if n == 0 or n == 1:
return 1
return fibs(n-1) + fibs(n-2)
`

Hello, World!
#comment{
A first program!
}
Code to compute nth fibonacci number.
`
def fibs(n):
if n == 0 or n == 1:
return 1
return fibs(n-1) + fibs(n-2)
`
That is all.

These are quickly hacked together, unpolished programs. Making this kind of hacking easy is what this notation is invented for.
Golang:
import "github.com/pratikdeoghare/brashtag"
Python:
pip install git+https://github.com/PratikDeoghare/brashtag.git
Javascript:
npm install git+https://github.com/pratikdeoghare/brashtag.git
Go
74.2%
HTML
9.4%
Python
7.6%
JavaScript
6.9%
Makefile
1.4%