0.0.8 • Published 8 years ago

concrete-parse v0.0.8

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
8 years ago

concrete

Languages tend to look pretty similar. Pretty much all of them use quotes and non-alphanumeric operators and braces for grouping things. import {parse} from 'concrete' to parse this structure out of your language. Then just map a standard AST (more aptly, Concrete Syntax Tree) to yours.

The concrete syntax tree is as follows.

tree : [expr]
expr : group | string | number | punctuation | linebreak | symbol
group : {type: 'group', value : [expr], delim: '(' | '[' | '{'}
string : {type: 'string', value : string}
number : {type: 'number', value : string}
punctuation : {type: 'punctuation', value : string}
linebreak : {type: 'punctuation', value : string}
symbol : {type: 'string', value : string}

See the test/ directory for an example of parsing lisp.

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago