G

G Programming Language
git clone http://git.omkov.net/G
Log | Tree | Refs | README | Download

AuthorJakob Wakeling <[email protected]>
Date2022-01-25 12:34:41
Commit4f9f3f4b1d18755d07b7f6d655ee8c4b21e05ff9
Parentcf8b281b4447136f4e238c6fe696af0b587e25b9

ebnf: Correct the decl_variable rule

Diffstat

M doc/g.ebnf | 2 +-

1 files changed, 1 insertions, 1 deletions

diff --git a/doc/g.ebnf b/doc/g.ebnf
index 9789983..ed4d8a9 100644
--- a/doc/g.ebnf
+++ b/doc/g.ebnf
@@ -11,7 +11,7 @@ prog            = { decl } ;
 (* Declarations *)
 decl            = iden, ":", decl_constant | decl_variable ;
 decl_constant   = [ type ], ":", expr, ";" ;
-decl_variable   = ( type, [ "=", expr ] ) | ( "=", expr ), ";" ;
+decl_variable   = [ type ], "=", expr, ";" | type, ";" ;
 
 (* Statements *)
 stmt            = stmt_compound