Skip to content
nin-jin edited this page Aug 20, 2021 · 3 revisions

schema.tree

Language for formal descript tree-based languages.

Example

schema.tree
	.about \Schema for schema.tree language.
	.list pattern

pattern
	.about \Custom pattern name can't starts with dot.
	.name .except
		\.
		.maybe .list .byte
	match

match
	.about \We can match to custom patterns or set of special patterns.
	.list .any
		pattern
		about
		example
		name
		byte
		maybe
		set
		list
		any
		except
		delimited

about
	.about \Short description of pattern.
	.name \.about
	ignore

example
	.about \Example tree with pattern usage.
	.name \.example
	ignore

name
	.about \Pattern for node name.
	.name \.name
	match

byte
	.about \Single octet
	.name \.byte
	.maybe except match

set
	.about \Unordered sequence of sub patterns.
	.example border_style .set
		length
		line_style
		color
	.name \.set
	match

maybe
	.about \Optional sub pattern.
	.example new_line
		.maybe carriage_return
		line_feed
	.name \.maybe
	match

list
	.about \One or more repetition of sub pattern. 
	.example word .list letter
	.name \.list
	match

any
	.about \Only one of sub patterns.
	.example bool .any
		true
		false
	.name \.any
	match

except
	.about \Exclude sub patter from super pattern.
	.example non_space .byte .except space
	.name \.except
	match

delimited
	.about \Separates sibling patterns by delimiter.
	.example classes .list
		word
		.delimited space
	.name \.delimited
	match

ignore
	.about \Ignored subtree.
	.maybe .list ignore
Clone this wiki locally