/nano-ui-scheme

UI-files scheme analizer

Primary LanguageJavaScriptMIT LicenseMIT

Gitter NPM version Build status Test coverage Dependency Status License Downloads

nano-ui-scheme

UI-files scheme compiler and validator

Scheme of ui-scheme

lex DEFID|TAG|LEXID ([A-Za-z0-9_-]+)\s*
lex PIPE            \|\s*
lex REGEXP          (.+)

lex POSTOP         ([?+-])\s*
lex BROP           \(\s*
lex BRCL           \)\s*

def GROUP
	seq BROP EXPR BRCL
	seq DEFID|LEXID

def POSTFIX
	seq GROUP POSTOP?

def SEQ
	seq POSTFIX+

def EXPR
	seq SEQ (PIPE SEQ)*

rule lex LEXID (PIPE LEXID)* REGEXP

rule def DEFID
	rule seq SEQ
	rule case TAG (PIPE TAG)* SEQ

rule rule TAG (PIPE TAG)* ARGUMENTS
	children rule
	rule children TAG (PIPE TAG)*

root-rule lex | root-rule | rule | def