This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
603 B

  1. //
  2. // Numbers
  3. //
  4. DIGIT: "0".."9"
  5. HEXDIGIT: "a".."f"|"A".."F"|DIGIT
  6. INT: DIGIT+
  7. SIGNED_INT: ["+"|"-"] INT
  8. DECIMAL: INT "." INT? | "." INT
  9. // float = /-?\d+(\.\d+)?([eE][+-]?\d+)?/
  10. _EXP: ("e"|"E") SIGNED_INT
  11. FLOAT: INT _EXP | DECIMAL _EXP?
  12. NUMBER: FLOAT | INT
  13. SIGNED_NUMBER: ["+"|"-"] NUMBER
  14. //
  15. // Strings
  16. //
  17. ESCAPED_STRING: /".*?(?<!\\\\)"/
  18. //
  19. // Names (Variables)
  20. //
  21. LCASE_LETTER: "a".."z"
  22. UCASE_LETTER: "A".."Z"
  23. LETTER: UCASE_LETTER | LCASE_LETTER
  24. CNAME: ("_"|LETTER) ("_"|LETTER|DIGIT)*
  25. //
  26. // Whitespace
  27. //
  28. WS_INLINE: (" "|/\t/)+
  29. WS: /[ \t\f\r\n]/+
  30. CR : /\r/
  31. LF : /\n/
  32. NEWLINE: (CR? LF)+