Add new rules

This commit is contained in:
Valk Richard Li 2019-08-13 00:52:58 +08:00 committed by GitHub
parent 815f471247
commit 8abc674887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

View File

@ -108,3 +108,20 @@
<choose> ::= [ <if> ] <(> <condition> <)> (<statement> <;>)|(<{> { <statement> <;> } <}>)
{ (<else> <if>)|<elsif> }|[ <else> ] <(> <condition> <)> (<statement> <;>)|(<{> { <statement> <;> } <}>)
<identifier> ::= IDENTIFIER
<number> ::= NUMBER
<string> ::= STRING
<array_search> ::= <identifier> <[> <number> <]>
<array_member> ::= (<number>|<string>|<array>|<hash>|<identifier>|<use_function>|<array_search>|<hash_search> <,>)|(<number>|<string>|<array>|<hash>|<identifier>|<use_function>|<array_search>|<hash_search>)
<array> ::= <[> <array_member> <]>
<hash_search> ::= <identifier> <[> <string> <]>
<hash_member> ::= (<identifier> <:> <number>|<string>|<array>|<hash>|<function>|<use_function>|<array_search>|<hash_search> <,>)|(<identifier> <:> <number>|<string>|<array>|<hash>|<function>|<use_function>|<array_search>|<hash_search>)
<hash> ::= <{> <hash_member> <}>
<parameter> ::= (<identifier> <,>)|<identifier>
<function> ::= <func> <(> <parameter> <)> <{> <statement> <}>
<use_function> ::= <identifier> <(> <parameter> <)>
<statement> ::= <definition>|<assignment>|<loop>|<ifelse>|<use_function>|<return> <;>
<definition> ::= <var> <identifier> <=> <number>|<string>|<array>|<hash>|<identifier>|<function>|<use_function>|<array_search>|<hash_search> <;>
<assignment> ::= <identifier> <=> <number>|<string>|<array>|<hash>|<identifier>|<function>|<use_function>|<array_search>|<hash_search> <;>