( (rule rulelist (plus (alt rule (seq (star c_wsp) c_nl)))) (rule rule (seq rulename defined_as elements c_nl)) (rule elements (seq alternation (star c_wsp))) (rule alternation (seq concatenation (star (seq (star c_wsp) "/" (star c_wsp) concatenation)))) (rule concatenation (seq repetition (star (seq (plus c_wsp) repetition)))) (rule repetition (seq (opt repeat) element)) (rule repeat (alt (seq (star DIGIT) "*" (star DIGIT)) (plus DIGIT))) (rule element (alt rulename group option char_val num_val prose_val)) (rule group (seq "(" (star c_wsp) alternation (star c_wsp) ")")) (rule option (seq "[" (star c_wsp) alternation (star c_wsp) "]")) (rule char_val (alt case_insensitive_string case_sensitive_string)) (rule case_insensitive_string (seq (opt "%i") quoted_string)) (rule case_sensitive_string (seq "%s" quoted_string)) (rule num_val (seq "%" (alt bin_val dec_val hex_val))) (terminals _terminals (seq)) (terminal rulename (seq ALPHA (star (alt ALPHA DIGIT "-")))) (terminal defined_as (seq (star c_wsp) (alt "=" "=/") (star c_wsp))) (terminal c_wsp (alt WSP (seq c_nl WSP))) (terminal c_nl (alt COMMENT CRLF)) (terminal comment (seq ";" (star (alt WSP VCHAR)) CRLF)) (terminal quoted_string (seq DQUOTE (star (range "#x20-#x21#x23-#x7E")) DQUOTE)) (terminal bin_val (seq "b" (plus BIT) (opt (alt (plus (seq "." (plus BIT))) (seq "-" (plus BIT)))))) (terminal dec_val (seq "d" (plus DIGIT) (opt (alt (plus (seq "." (plus DIGIT))) (seq "-" (plus DIGIT)))))) (terminal hex_val (seq "x" (plus HEXDIG) (opt (alt (plus (seq "." (plus HEXDIG))) (seq "-" (plus HEXDIG)))))) (terminal prose_val (seq "<" (star (range "#x20-#x3D#x3F-#x7E")) ">")) (terminal ALPHA (range "#x41-#x5A#x61-#x7A")) (terminal BIT (alt '0' '1')) (terminal CHAR (range "#x01-#x7F")) (terminal CR (hex "#x0D")) (terminal CRLF (seq (opt CR) LF)) (terminal CTL (alt (range "#x00-#x1F") (hex "#x7F"))) (terminal DIGIT (range "#x30-#x39")) (terminal DQUOTE (hex "#x22")) (terminal HEXDIG (alt DIGIT "A" "B" "C" "D" "E" "F")) (terminal HTAB (hex "#x09")) (terminal LF (hex "#x0A")) (terminal LWSP (star (alt WSP (seq CRLF WSP)))) (terminal OCTET (range "#x00-#xFF")) (terminal SP (hex "#x20")) (terminal VCHAR (range "#x21-#x7E")) (terminal WSP (alt SP HTAB)))