bml
The better markup language.
Examples
Hello world!
in HTML
<body>
<h1>Hello, World!</h1>
</body>
in BML
`body` {
`h1` {
`Hello, World!`
};
};
Use
git clone https://github.com/AcaiBerii/bml
cd bml
Replace interp.py
with the file of your choice that interacts with the BML parser API.
Using the API
# Initialize SimpleBML.
parser = BML()
# Completely parse text.
print(parser.parse(input("Run > ")))
# Just lex text.
print(list(parser.just_lex(input("Lex > "))))
BUGS
- Grouping by array:
BML:`h1` { `h3` { `hello` }; }; `h2` { `hi` };
OUTPUT:
[['<h1><h3>hello</h3></h1>'], '<h2>hi</h2>']
If you know how to fix this, please submit a pull request.