-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de2dda5
commit 5d04944
Showing
2 changed files
with
163 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
# NOTE: The entire scripting language is NOT case sensitive! | ||
# NOTE: Symbols [, ], # and keywords can be quoted with \ when they should be used as text | ||
|
||
script -> line* | ||
line -> expression? comment? # Lines can be extended by ending them with \ | ||
script -> line* | ||
line -> expression? comment? # Lines can be extended by ending them with \ | ||
|
||
expression -> directive | command # Expression contents can be modified with script arguments | ||
script_arg -> "$(" NUMBER ")" | ||
expression -> directive | command # Expression contents can be modified with script arguments | ||
script_arg -> "$(" NUMBER ")" | ||
|
||
command -> TEXT argument* | ||
argument -> variable | TEXT | ||
variable -> \S* ("$(" "^"* TEXT ")" \S*)+ | ||
command -> TEXT argument* | ||
argument -> variable | TEXT | ||
variable -> \S* ("$(" "^"* TEXT ")" \S*)+ | ||
|
||
directive -> "[" directive_body "]" | ||
directive -> "[" directive_body "]" | ||
directive_body -> foreach_loop | if_expr | delay_expr | forrandom_loop | sequence | ||
foreach_loop -> expression "foreach" TEXT # Inner expression gets access to iterated objects properties through variables | ||
if_expr -> (expression "if")? expression ("else" expression)? | ||
delay_expr -> expression "delayby" NUMBER TEXT? | ||
if_expr -> (expression "if")? expression ("else" expression)? | ||
delay_expr -> expression "delayby" NUMBER TEXT? | ||
forrandom_loop -> expression "forrandom" TEXT (NUMBER "%"?)? ("else" expression)? # Inner expressions get access to iterated objects properties through variables | ||
sequence -> expression ("|" expression)+ | ||
sequence -> expression ("|" expression)+ | ||
|
||
comment -> "#" comment_body | ||
comment -> "#" comment_body | ||
comment_body -> permissions_guard | scope_guard | [^!?] .* | ||
permissions_guard -> "!" TEXT* | ||
scope_guard -> "?" scope_name* | ||
scope_name -> "RemoteAdmin" | "Console" | "GameConsole" | ||
scope_guard -> "?" scope_name* | ||
scope_name -> "RemoteAdmin" | "Console" | "GameConsole" | ||
|
||
TEXT -> \S+ | ||
NUMBER -> [0-9]+ | ||
TEXT -> \S+ | ||
NUMBER -> [0-9]+ |
Oops, something went wrong.