This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

19 行
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)* ","?