Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

A timestamp is specified as two groups of decimal numbers separated by
whitespace in the form YYYY-MM-DD HH:MM:SS, e.g.,
2012-05-30 23:40:55. It is interpreted as UTC date and time.

Command grammar

Wiki MarkupHere's the command grammar in Extended Backus-Naur Form, or EBNF. Each rule begins with the name of an entity followed by "=" and then the definition terminated by a period. Words in quotes appear literally, i.e., they are not the names of rules to be substituted. Items are assumed to be separated by whitespace, e.g.,
"foobar" is never interpreted as "foo" followed by "bar"; that would have to be written as "foo bar". A run of whitespace is treated as if it were a single space. "|" is used to indicate alternatives. Parentheses are used for grouping. "\[" and "\]" enclose optional items. "\{" and "\}" enclose item sequences that may be repeated zero or more times (at least once if a plus sign follows the trailing brace).

Code Block
none
none
program = {command END-OF-LINE}.

command = addCommand      | updateCommand | setCommand   | initCommand   |
          eraseCommand    | dumpCommand   | showCommand  | 
          exitCommand     | helpCommand   | beginCommand | commitCommand |
          rollbackCommand | restoreCommand.



addCommand = "add" (macAdd | logAdd | boardAdd).

macAdd = "mac" macAddress "board" boardRef ["used" "at" timestamp] ["retired" "at" timestamp].

logAdd = "log" "entry" ["board" boardRef] ["at" timestamp] "comment" REST-OF-LINE.

boardAdd = (cmb1 | "rtm")   "board" HEX TYPENAME ["good" | "bad"] ["retired"].



updateCommand = "update" (macUpdate | boardUpdate).

macUpdate = macAdd "comment" REST-OF-LINE.

boardUpdate = ("cmb1" | "rtm")   "board" boardRef [TYPENAME] ["good" | "bad"] ["retired"] "comment" REST-OF-LINE.



setCommand = "set" paramInfo.

paramInfo = dbSchemaParam DECIMAL | eepromSchemaParam DECIMAL | nextMacParam macAddress.

paramName = dbSchemaParam | eepromSchemaParam | nextMacParam.

dbSchemaParam = "db" "schema".

eepromSchemaParam = "eeprom" "schema".

nextMacParam = "next" "mac".



dumpCommand = "dump" (dbDump | eepromDump).

dbDump = "db"  ["to" filename] ["as" "wiki" | dbSelection].

dbSelection = "parameter" | "board" | "mac" | "log".



initCommand = "init" "eeprom" initInfo.

restoreCommand = "restore" "eeprom" initInfo.

eraseCommand = "erase" "eeprom".

eepromDump = "eeprom"  ["to" filename] { "hex" | "xml" ["lines" DECIMAL] }.

initInfo = "from" filename "comment" REST-OF-LINE.



showCommand = "show" (paramShow | boardShow | macShow | logShow | replacementShow ).

paramShow = "parameter" [paramName].

boardShow = "board" ("type" | "with" "mac" macAddr | boardRef).

macShow =  "mac" [macAddress].

logShow =  "log" ["backwards"] ["from" timestamp] ["to" timestamp] ["containing" REST-OF-LINE].

replacementShow = "replacement".



exitCommand = "exit" | "stop" | "quit" | "halt" | "bye" | "end" | EOF.



beginCommand = "begin" ["transaction"].



commitCommand = "commit".



rollbackCommand = "rollback".



filename = DOUBLE-QUOTE {anything-but-double-quote}+ DOUBLE-QUOTE.

macAddress = HEX.

boardRef = HEX | "*".

timestamp   = DECIMAL "-" DECIMAL "-" DECIMAL DECIMAL ":" DECIMAL ":" DECIMAL