ast.txt 572 B

123456789101112131415161718192021222324252627
  1. ast
  2. ===
  3. pseudo regex to help remember the syntax rules.
  4. \u = unicode character (note utf-x currently just using std c ascii support)
  5. \t = horizintal tab
  6. \n = newline
  7. {x} = see rule x, 'x' must be the name of a rule or it's just regex syntax
  8. node{
  9. "\n\n" = close open tag
  10. "\u." = ol,li,{list}
  11. "[*-] " = ul,li,{list}
  12. "\t\u+" = pre/
  13. "\u\n={3,}\n" = h1/
  14. "\u\n-{3,}\n" = h2/
  15. "\u(\u|\n|\t)+\n\n" = p/
  16. }
  17. list{
  18. "\n\n" = '/li','/ol'
  19. "\n\u." = '/li','li'
  20. "\n\u[^.]" = (hardbreaks) ? 'br/' : ' '
  21. }