pegtree
TypeScript icon, indicating that this package has built-in type declarations

0.9.8 • Public • Published

pegtree

Build Status Downloads Version License

Python Versions PyPI version

PEG-Tree Parser Combinator for Python3 and TypeScript

Installation

Python3

pip3 install pegtree

TypeScript

npm install pegtree --save

Usage

Python3

from pegtree import Grammar
 
peg = Grammar('''
 
''')
parser = peg.generate()
tree = parser('1+2*3')
print(repr(tree))

TypeScript

import { Grammar } from 'pegtree'
const peg = new Grammar(`
 
`)
const parser = peg.generate()
const tree = parser('1+2*3')
console.log(tree)

Test

TypeScript

npm run test

Readme

Keywords

Package Sidebar

Install

npm i pegtree

Weekly Downloads

0

Version

0.9.8

License

MIT

Unpacked Size

422 kB

Total Files

18

Last publish

Collaborators

  • kkuramitsu