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.

19 rivejä
574 B

  1. // Python terminals
  2. NAME: /[a-zA-Z_]\w*/
  3. COMMENT: /#[^\n]*/
  4. STRING : /[ubf]?r?("(?!"").*?(?<!\\)(\\\\)*?"|'(?!'').*?(?<!\\)(\\\\)*?')/i
  5. LONG_STRING: /[ubf]?r?(""".*?(?<!\\)(\\\\)*?"""|'''.*?(?<!\\)(\\\\)*?''')/is
  6. DEC_NUMBER: /0|[1-9][\d_]*/i
  7. HEX_NUMBER.2: /0x[\da-f]*/i
  8. OCT_NUMBER.2: /0o[0-7]*/i
  9. BIN_NUMBER.2 : /0b[0-1]*/i
  10. FLOAT_NUMBER.2: /((\d+\.[\d_]*|\.[\d_]+)(e[-+]?\d+)?|\d+(e[-+]?\d+))/i
  11. IMAG_NUMBER.2: /\d+j/i | FLOAT_NUMBER "j"i
  12. // Comma-separated list (with an optional trailing comma)
  13. cs_list{item}: item ("," item)* ","?
  14. _cs_list{item}: item ("," item)* ","?