1
0
Fork 0
mirror of https://github.com/kou029w/quot.git synced 2025-01-19 08:28:09 +00:00
quot/app/syntax/quot.grammar

16 lines
380 B
Text
Raw Normal View History

2022-09-16 21:30:29 +09:00
@top Document { heading line* }
heading { Heading "\n" }
line { Indent* (AutoLink | Word) (AutoLink | Word | Spaces)* "\n" }
@tokens {
space { $[ \t] }
letter { ![ \t\n]+ }
Heading { letter+ }
Indent { space }
Spaces { space+ }
AutoLink { ("http" | "https") "://" letter+ }
Word { letter+ }
@precedence { AutoLink, Word }
}