0.2.1 • Published 6 years ago

polynomic v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Grammars

pathstring
  : WhiteSpace? group* WhiteSpace?

group
  : segMoveto command*

command
  : segClosepath
  | segLineto
  | segCurvetoCubic
  | segCurvetoQuadratic
  | segArc
  | segLinetoHorizontal
  | segLinetoVertical
  | segCurvetoCubicSmooth
  | segCurvetoQuadraticSmooth

segClosepath
  : SegClosepath

segMoveto
  : (SegMovetoAbs | SegMovetoRel) WhiteSpace? (segMovetoParams sep?)+

segMovetoParams
  : coordinates

segLineto
  : (SegLinetoAbs | SegLinetoRel) WhiteSpace? (segLinetoParams sep?)+

segLinetoParams
  : coordinates

segCurvetoCubic
  : (SegCurvetoCubicAbs | SegCurvetoCubicRel) WhiteSpace? (segCurvetoCubicParams sep?)+

segCurvetoCubicParams
  : coordinates sep? coordinates sep? coordinates

segCurvetoQuadratic
  : (SegCurvetoQuadraticAbs | SegCurvetoQuadraticRel) WhiteSpace? (segCurvetoQuadraticParams sep?)+

segCurvetoQuadraticParams
  : coordinates sep? coordinates

segArc
  : (SegArcAbs | SegArcRel) WhiteSpace? (segArcParams sep?)+

segArcParams
  : NumberLiteral sep? NumberLiteral sep? NumberLiteral sep? Flag sep? Flag sep? coordinates

segLinetoHorizontal
  : (SegLinetoHorizontalAbs | SegLinetoHorizontalRel) WhiteSpace? (segLinetoHorizontalParams sep?)+

segLinetoHorizontalParams
  : NumberLiteral

segLinetVerticalo
  : (SegLinetoVerticalAbs | SegLinetoVerticalRel) WhiteSpace? (segLinetoVerticalParams sep?)+

segLinetoVerticalParams
  : NumberLiteral

segCurvetoCubicSmooth
  : (SegCurvetoCubicSmoothAbs | SegCurvetoCubicSmoothRel) WhiteSpace? (segCurvetoCubicSmoothParams sep?)+

segCurvetoCubicSmoothParams
  : coordinates sep? coordinates

segCurvetoQuadraticSmooth
  : (SegCurvetoQuadraticSmoothAbs | SegCurvetoQuadraticSmoothRel) WhiteSpace ? (segCurvetoQuadraticSmoothParams sep?)+

segCurvetoQuadraticSmoothParams
  : coordinates

coordinates
  : NumberLiteral sep? NumberLiteral

sep
  : (WhiteSpace Comma? | Comma) WhiteSpace?
points
  : WhiteSpace? pairs? WhiteSpace?

pairs
  : coordinates (sep coordinates)*

coordinates
  : NumberLiteral sep? NumberLiteral

sep
  : (WhiteSpace Comma? | Comma) WhiteSpace?
1.0.0-alpha.0

6 years ago

1.0.0

6 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.1-3

8 years ago

0.0.1-2

8 years ago

0.0.1-1

8 years ago

0.0.1-0

8 years ago