autocorrect 2.14.2

A linter and formatter for help you improve copywriting, to correct spaces, words, punctuations between CJK (Chinese, Japanese, Korean).
Documentation
//! PHP Parser
item       = _{ SOI ~ line* ~ EOI }
line       = _{ php | other }
other      = ${ !(php) ~ ANY }
WHITESPACE =  { " " | "\t" | NEWLINE }

/// Comment
COMMENT       = ${ line_comment | block_comment }
line_comment  = _{ ("//" | "#") ~ (!(NEWLINE) ~ ANY)* }
block_comment = _{ "/*" ~ (!("*/") ~ ANY)* ~ "*/" }

/// PHP entry
php       = _{ open_php ~ (!close_php ~ expr)* ~ close_php }
open_php  = ${ "<?php" }
close_php = ${ "?>" }

/// Expressions
expr = { regexp | string | other }

/// String
string       = ${ inner_string }
inner_string = _{
    ("\"\"\"" ~ (!("\"\"\"") ~ ANY)* ~ "\"\"\"")
  | ("\"" ~ (!("\"") ~ ANY)* ~ "\"")
}

/// Regexp
regexp = ${
    (("preg_match_all" | "preg_match") ~ "(" ~ " "* ~ inner_string ~ (!")" ~ ANY)* ~ ")")
}