{} | 零次以上 | |
[] | 零次 或 一次 | |
<> | 表示非終端符號 | |
<space> | ::= | ' ' |
<new_line> | ::= | "\r" | "\n" | "\r\n" |
<character> | ::= | just character including space |
<comment> | ::= | '//' {<character>} (<new_line> | end_of_file) |
<commentInline> | ::= | '/*' {<character>} '*/' |
<digit> | ::= | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' |
<number> | ::=
| |
['-'] '0' ['.' <digit> {<digit>}]
['-'] (<digit> except '0') {<digit>} ['.' <digit> {<digit>}] |
<string> | ::= | '"' {"\"" | "\\" | "\/" | "\b" | "\f" | "\n" | "\r" | "\t" | <character>} '"' |
<chinese_word> | ::= | character code bigger than 255 (255 excluded) |
<identifier> | ::= | ['_'] ('a'-'z' | 'A'-'Z' | <chinese_word>) {'_' | <digit> | 'a'-'z' | 'A'-'Z' | <chinese_word>} |
<keyword> | ::= | 'if' | 'else' | 'alert' | 'var' | 'for' | 'true' | 'false' |
<symbol> | ::= | '>=' | '<=' | '!=' | '==' | '+' | '-' | '*' | '/' | '(' | ')' | '{' | '}' | '>' | '<' | '=' | ';' | ',' | '.' |