Guest User

Untitled

a guest
Jun 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. grammar Debian
  2. rule package_list
  3. (package "\n"?)+
  4. end
  5. rule package
  6. (tag / value)+ <DebianSyntaxNode::Package>
  7. end
  8. rule tag
  9. tag_value tag_stop
  10. end
  11. rule tag_value
  12. [\w\-]+ <DebianSyntaxNode::Tag>
  13. end
  14. rule tag_stop
  15. ": "
  16. end
  17. rule value
  18. value_line value_stop
  19. end
  20. rule value_line
  21. ([\w \. " , \- ' : / < > @ ( ) = | \[ \] + ;])+ <DebianSyntaxNode::Value>
  22. end
  23. rule value_stop
  24. "\n"?
  25. end
  26.  
  27. # I should post to the mailing list about why this didn't work.
  28. #rule entry_value
  29. # ([\w \n\.",\-'":])+
  30. #end
  31. #rule entry
  32. # entry_value entry_stop
  33. #end
  34. #rule entry_stop
  35. # "\n" &tag
  36. #end
  37.  
  38. #rule tag
  39. # "\n"? tag_value tag_stop
  40. #end
  41. #rule tag_value
  42. # ([\w\-])+
  43. #end
  44. #rule tag_stop
  45. # ": "
  46. #end
  47. end
Add Comment
Please, Sign In to add comment