diff --git a/src/doc/syntax.md b/src/doc/syntax.md index 14005e0..78a0092 100644 --- a/src/doc/syntax.md +++ b/src/doc/syntax.md @@ -13,4 +13,12 @@ circle(A, len(AB)) ## Primitives * `Point point(x, y)` is a 2D point. It returns an element of type `Point` * `Line line(Point from, Point to)` is a straight line. It returns an element of type `Line`. -* `Circle circle(Point center, radius)` draws a circle at `center` and `radius` \ No newline at end of file +* `Circle circle(Point center, radius)` draws a circle at `center` and `radius` + +## Grammar +``` +instruction ::= identifier({parameter, }) +parameter ::= instruction | identifier | number +identifier ::= (A-Za-z) +number ::= (0-9)[.(0-9)] +``` \ No newline at end of file