Skip to content

7131/analysis

Repository files navigation

Siteswap Analyzer

You can analyze siteswaps. If the siteswap is valid, the number of balls, the period, and the state are displayed respectively. You can also demonstrate using JuggleMaster JavaScript.

File list

index.html
This is the main page for the Siteswap Analyzer.
default.css
The style sheet for the main page.
grammar.js
The grammar object and the syntax converter.
parser.js
Classes for parser, token, syntax tree, and state stack.
validator.js
A siteswap validation class.
controller.js
This is a controller that receives the input of the main page and outputs the analysis result.
test.html
This is a page for testing the Siteswap Analyzer.
test.css
The style sheet for the test page.
test.js
This is a controller that receives the input of the test page and outputs the test result to the table.

Siteswap specifications by ABNF

The followings are the specifications of the pattern of the siteswap to be accepted.

Pattern     = Async / Synch
Async       = 1*EachHand
EachHand    = AsyncSimple / AsyncMulti
AsyncSimple = Even / Odd
Even        = "0" / "2" / "4" / "6" / "8" / "a" / "c" / "e" / "g" / "i" / "k" / "m" / "o" / "q" / "s" / "u" / "w" / "y"
Odd         = "1" / "3" / "5" / "7" / "9" / "b" / "d" / "f" / "h" / "j" / "l" / "n" / "p" / "r" / "t" / "v" / "x" / "z"
AsyncMulti  = "[" 2*AsyncSimple "]"
Synch       = 1*BothHand ["*"]
BothHand    = "(" OneHand "," OneHand ")"
OneHand     = SynchSimple / SynchMulti
SynchSimple = Even ["x"]
SynchMulti  = "[" 2*SynchSimple "]"