Sha256: 320c556f0ff9bb3b4783305d64c538ceb2d35a69805290c3958d2420842a4f36

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 Bytes

Contents

grammar GlyphLanguage

	rule expression
		(escaping_macro / macro / escaped_text)* <GlyphSyntaxNode> 
	end	

	rule escaping_macro
		macro_name '[=' text '=]' <EscapingMacroNode> 
	end

	rule macro
		macro_name '[' expression ']' <MacroNode> 
	end

	rule escaped_text
		(('\\' .) / !((macro_name ('[' / '[=')) / (']' / '=]')) .)+  <TextNode> 
	end

	rule text
		(('\\' .) / !((macro_name '[=') / '=]') .)+ <TextNode> 	
	end

	rule macro_name
		[^\[\]\|\\\s]+
	end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
glyph-0.2.0 lib/glyph/glyph_language.treetop