-
Notifications
You must be signed in to change notification settings - Fork 265
Automator EBNF
Andrei Andreev edited this page Feb 3, 2019
·
13 revisions
I've added some more stuff than our automator can currently handle, so be careful
For people who don't know what EBNF is, or who have troubles reading it, try this http://www.bottlecaps.de/rr/ui. Paste into "Edit Grammar" and then switch to "View Diagram"
Script ::= Line*
Line ::= ( Expression | Comment | "" ) "\n"
Expression ::= Buy | Wait | If | Unlock | Start | Change | Toggle | Respec | Eternity | Stop | Load | Notify | VarDeclaration
Buy ::= "BUY" ( BuyStudy | BuyTT )
BuyStudy ::= "STUDY" NumberFactor | "STUDYUNTIL" NumberFactor | "STUDYPATH" (Path | Identifier) | "STUDYIMPORT" (Tree | Identifier)
BuyTT ::= ( "TTIP" | "TTEP" | "TTAM" ) NumberFactor | "TTMAX" | "TTGEN"
Wait ::= "WAIT" ( Comparison | "TIME" NumberFactor )
If ::= "IF" Comparison
Comparison ::= ( Resource Operator NumberFactor ) | "RG MAX"
Resource ::= "TT" | "ANTIMATTER" | "IP" | "EP" | "REPLICANTI" | "RG"
Operator ::= "=" | "!=" | ">" | ">=" | "<" | "<="
Unlock ::= "UNLOCK" ( "EC" NumberFactor | "DILATION" )
Start ::= "START" ( "EC" NumberFactor | "DILATION" )
Change ::= "CHANGE" ( "IPAUTOBUYER" | "EPAUTOBUYER" ) NumberFactor
Toggle ::= "TOGGLE" Autobuyer ("ON" | "OFF")?
Autobuyer ::= ( "D" [1-8] ) | "TICKSPEED" | "DIMBOOST" | "GALAXY" | "INFINITY" | "SACRIFICE" | "ETERNITY"
Respec ::= "RESPEC"
Eternity ::= "ETERNITY"
Stop ::= "STOP"
Load ::= "LOAD" Integer
Notify ::= "NOTIFY" String
NumberFactor ::= Identifier | Number | Decimal
VarDeclaration ::= StringDeclaration | NumberDeclaration | PathDeclaration | TreeDeclaration
StringDeclaration ::= "STRING" Identifier String
NumberDeclaration ::= "NUMBER" Identifier ( Number | Decimal )
PathDeclaration ::= "PATH" Identifier Path
TreeDeclaration ::= "TREE" Identifier Tree
Identifier ::= A-Za-z [A-Za-z0-9]*
Path ::= ( "ALL" | "NONE" ) ( "ND" | "NORMAL" )? ( "ID" | "INFINITY" )? ( "TD" | "TIME" )? ( "ACTIVE" | "PASSIVE" | "IDLE" )? ( Integer )*
Tree ::= (Integer ",")+ "|" Integer
Decimal ::= Number "e" Number
Number ::= Integer ("." Integer)?
Integer ::= [0-9]+
String ::= '"' Text '"'
Comment ::= "//" Text
Text ::= Character*