From 90c6bd01fce0697b142588d387fe88c1456cd32c Mon Sep 17 00:00:00 2001 From: Kshitij Chhabra Date: Mon, 17 Oct 2022 14:22:36 -0700 Subject: [PATCH] Update `antlr4-python3-runtime` to 4.9.2 (#51) Update `antlr4-python3-runtime` to `v4.9.2`, and include generated grammar files. --- .github/CHANGELOG.md | 3 + .readthedocs.yml | 4 +- blackbird_cpp/blackbird.interp | 67 +- blackbird_cpp/blackbird.tokens | 151 +- blackbird_cpp/blackbirdBaseVisitor.cpp | 2 +- blackbird_cpp/blackbirdBaseVisitor.h | 80 +- blackbird_cpp/blackbirdLexer.cpp | 585 ++-- blackbird_cpp/blackbirdLexer.h | 21 +- blackbird_cpp/blackbirdLexer.interp | 68 +- blackbird_cpp/blackbirdLexer.tokens | 151 +- blackbird_cpp/blackbirdParser.cpp | 3042 +++++++++++++---- blackbird_cpp/blackbirdParser.h | 458 ++- blackbird_cpp/blackbirdVisitor.cpp | 2 +- blackbird_cpp/blackbirdVisitor.h | 44 +- blackbird_python/blackbird/blackbirdLexer.py | 9 +- .../blackbird/blackbirdListener.py | 2 +- blackbird_python/blackbird/blackbirdParser.py | 39 +- doc/blackbird_python/installing.rst | 2 +- doc/installing.rst | 8 +- doc/requirements.txt | 2 +- requirements.txt | 2 +- setup.py | 2 +- 22 files changed, 3531 insertions(+), 1213 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index a57a726..8f2aa82 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -2,6 +2,9 @@

New features since last release

+* Rebuilds the grammar using ANTLR `v4.9.2` + [(#51)](https://github.com/XanaduAI/blackbird/pull/51) +

Improvements

Breaking changes

diff --git a/.readthedocs.yml b/.readthedocs.yml index dd65088..64e9980 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,8 +4,8 @@ build: image: latest python: - version: 3.6 + version: 3.8 # Don't build any extra formats formats: - - none \ No newline at end of file + - none diff --git a/blackbird_cpp/blackbird.interp b/blackbird_cpp/blackbird.interp index 25a0d46..47cf26a 100644 --- a/blackbird_cpp/blackbird.interp +++ b/blackbird_cpp/blackbird.interp @@ -6,6 +6,8 @@ null '/' '**' '=' +'for' +'in' null null null @@ -16,11 +18,26 @@ null null null null -'with' +'name' +'version' +'target' +'type' +'include' 'sqrt' 'sin' 'cos' +'tan' +'arcsin' +'arccos' +'arctan' +'sinh' +'cosh' +'tanh' +'arcsinh' +'arccosh' +'arctanh' 'exp' +'log' '.' ',' ':' @@ -29,6 +46,8 @@ null ')' '[' ']' +'{' +'}' '|' 'array' 'float' @@ -41,6 +60,7 @@ null null null null +null token symbolic names: null @@ -50,6 +70,8 @@ TIMES DIVIDE PWR ASSIGN +FOR +IN INT FLOAT COMPLEX @@ -60,11 +82,26 @@ PI NEWLINE TAB SPACE -WITH +PROGNAME +VERSION +TARGET +PROGTYPE +INCLUDE SQRT SIN COS +TAN +ARCSIN +ARCCOS +ARCTAN +SINH +COSH +TANH +ARCSINH +ARCCOSH +ARCTANH EXP +LOG PERIOD COMMA COLON @@ -73,6 +110,8 @@ LBRAC RBRAC LSQBRAC RSQBRAC +LBRACE +RBRACE APPLY TYPE_ARRAY TYPE_FLOAT @@ -80,6 +119,7 @@ TYPE_COMPLEX TYPE_INT TYPE_STR TYPE_BOOL +REGREF MEASURE NAME DEVICE @@ -88,28 +128,41 @@ ANY rule names: start -varblock +metadatablock +declarename +programname +version +versionnumber +target +device +declaretype +programtype +include +program expressionvar arrayvar name +invalid +reserved vartype nonnumeric shape arrayval arrayrow -program -device statement operation measure +forloop arguments kwarg val -modes +vallist +rangeval expression +parameter number function atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 43, 229, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 3, 2, 3, 2, 3, 2, 7, 2, 50, 10, 2, 12, 2, 14, 2, 53, 11, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 7, 3, 60, 10, 3, 12, 3, 14, 3, 63, 11, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 70, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 79, 10, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 7, 9, 94, 10, 9, 12, 9, 14, 9, 97, 11, 9, 3, 10, 3, 10, 3, 10, 3, 10, 7, 10, 103, 10, 10, 12, 10, 14, 10, 106, 11, 10, 3, 11, 3, 11, 3, 11, 7, 11, 111, 10, 11, 12, 11, 14, 11, 114, 11, 11, 3, 12, 3, 12, 3, 12, 5, 12, 119, 10, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 7, 12, 127, 10, 12, 12, 12, 14, 12, 130, 11, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 5, 14, 137, 10, 14, 3, 14, 5, 14, 140, 10, 14, 3, 14, 3, 14, 5, 14, 144, 10, 14, 3, 14, 3, 14, 5, 14, 148, 10, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 7, 17, 160, 10, 17, 12, 17, 14, 17, 163, 11, 17, 5, 17, 165, 10, 17, 3, 17, 3, 17, 3, 17, 7, 17, 170, 10, 17, 12, 17, 14, 17, 173, 11, 17, 5, 17, 175, 10, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 5, 19, 185, 10, 19, 3, 20, 3, 20, 3, 20, 7, 20, 190, 10, 20, 12, 20, 14, 20, 193, 11, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 209, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 7, 21, 220, 10, 21, 12, 21, 14, 21, 223, 11, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 2, 3, 40, 24, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 2, 11, 3, 2, 33, 38, 3, 2, 12, 13, 3, 2, 40, 41, 4, 2, 28, 28, 30, 30, 4, 2, 29, 29, 31, 31, 3, 2, 3, 4, 3, 2, 5, 6, 4, 2, 9, 11, 15, 15, 3, 2, 20, 23, 2, 236, 2, 46, 3, 2, 2, 2, 4, 61, 3, 2, 2, 2, 6, 64, 3, 2, 2, 2, 8, 71, 3, 2, 2, 2, 10, 84, 3, 2, 2, 2, 12, 86, 3, 2, 2, 2, 14, 88, 3, 2, 2, 2, 16, 90, 3, 2, 2, 2, 18, 104, 3, 2, 2, 2, 20, 107, 3, 2, 2, 2, 22, 115, 3, 2, 2, 2, 24, 131, 3, 2, 2, 2, 26, 133, 3, 2, 2, 2, 28, 151, 3, 2, 2, 2, 30, 153, 3, 2, 2, 2, 32, 155, 3, 2, 2, 2, 34, 178, 3, 2, 2, 2, 36, 184, 3, 2, 2, 2, 38, 186, 3, 2, 2, 2, 40, 208, 3, 2, 2, 2, 42, 224, 3, 2, 2, 2, 44, 226, 3, 2, 2, 2, 46, 47, 5, 4, 3, 2, 47, 51, 5, 22, 12, 2, 48, 50, 7, 16, 2, 2, 49, 48, 3, 2, 2, 2, 50, 53, 3, 2, 2, 2, 51, 49, 3, 2, 2, 2, 51, 52, 3, 2, 2, 2, 52, 54, 3, 2, 2, 2, 53, 51, 3, 2, 2, 2, 54, 55, 7, 2, 2, 3, 55, 3, 3, 2, 2, 2, 56, 60, 7, 16, 2, 2, 57, 60, 5, 6, 4, 2, 58, 60, 5, 8, 5, 2, 59, 56, 3, 2, 2, 2, 59, 57, 3, 2, 2, 2, 59, 58, 3, 2, 2, 2, 60, 63, 3, 2, 2, 2, 61, 59, 3, 2, 2, 2, 61, 62, 3, 2, 2, 2, 62, 5, 3, 2, 2, 2, 63, 61, 3, 2, 2, 2, 64, 65, 5, 12, 7, 2, 65, 66, 5, 10, 6, 2, 66, 69, 7, 8, 2, 2, 67, 70, 5, 40, 21, 2, 68, 70, 5, 14, 8, 2, 69, 67, 3, 2, 2, 2, 69, 68, 3, 2, 2, 2, 70, 7, 3, 2, 2, 2, 71, 72, 5, 12, 7, 2, 72, 73, 7, 33, 2, 2, 73, 78, 5, 10, 6, 2, 74, 75, 7, 30, 2, 2, 75, 76, 5, 16, 9, 2, 76, 77, 7, 31, 2, 2, 77, 79, 3, 2, 2, 2, 78, 74, 3, 2, 2, 2, 78, 79, 3, 2, 2, 2, 79, 80, 3, 2, 2, 2, 80, 81, 7, 8, 2, 2, 81, 82, 7, 16, 2, 2, 82, 83, 5, 18, 10, 2, 83, 9, 3, 2, 2, 2, 84, 85, 7, 40, 2, 2, 85, 11, 3, 2, 2, 2, 86, 87, 9, 2, 2, 2, 87, 13, 3, 2, 2, 2, 88, 89, 9, 3, 2, 2, 89, 15, 3, 2, 2, 2, 90, 95, 7, 9, 2, 2, 91, 92, 7, 25, 2, 2, 92, 94, 7, 9, 2, 2, 93, 91, 3, 2, 2, 2, 94, 97, 3, 2, 2, 2, 95, 93, 3, 2, 2, 2, 95, 96, 3, 2, 2, 2, 96, 17, 3, 2, 2, 2, 97, 95, 3, 2, 2, 2, 98, 99, 7, 17, 2, 2, 99, 100, 5, 20, 11, 2, 100, 101, 7, 16, 2, 2, 101, 103, 3, 2, 2, 2, 102, 98, 3, 2, 2, 2, 103, 106, 3, 2, 2, 2, 104, 102, 3, 2, 2, 2, 104, 105, 3, 2, 2, 2, 105, 19, 3, 2, 2, 2, 106, 104, 3, 2, 2, 2, 107, 112, 5, 40, 21, 2, 108, 109, 7, 25, 2, 2, 109, 111, 5, 40, 21, 2, 110, 108, 3, 2, 2, 2, 111, 114, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 112, 113, 3, 2, 2, 2, 113, 21, 3, 2, 2, 2, 114, 112, 3, 2, 2, 2, 115, 116, 7, 19, 2, 2, 116, 118, 5, 24, 13, 2, 117, 119, 5, 32, 17, 2, 118, 117, 3, 2, 2, 2, 118, 119, 3, 2, 2, 2, 119, 120, 3, 2, 2, 2, 120, 121, 7, 26, 2, 2, 121, 128, 7, 16, 2, 2, 122, 127, 5, 26, 14, 2, 123, 127, 7, 16, 2, 2, 124, 125, 7, 17, 2, 2, 125, 127, 7, 16, 2, 2, 126, 122, 3, 2, 2, 2, 126, 123, 3, 2, 2, 2, 126, 124, 3, 2, 2, 2, 127, 130, 3, 2, 2, 2, 128, 126, 3, 2, 2, 2, 128, 129, 3, 2, 2, 2, 129, 23, 3, 2, 2, 2, 130, 128, 3, 2, 2, 2, 131, 132, 9, 4, 2, 2, 132, 25, 3, 2, 2, 2, 133, 136, 7, 17, 2, 2, 134, 137, 5, 28, 15, 2, 135, 137, 5, 30, 16, 2, 136, 134, 3, 2, 2, 2, 136, 135, 3, 2, 2, 2, 137, 139, 3, 2, 2, 2, 138, 140, 5, 32, 17, 2, 139, 138, 3, 2, 2, 2, 139, 140, 3, 2, 2, 2, 140, 141, 3, 2, 2, 2, 141, 143, 7, 32, 2, 2, 142, 144, 9, 5, 2, 2, 143, 142, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 145, 3, 2, 2, 2, 145, 147, 5, 38, 20, 2, 146, 148, 9, 6, 2, 2, 147, 146, 3, 2, 2, 2, 147, 148, 3, 2, 2, 2, 148, 149, 3, 2, 2, 2, 149, 150, 7, 16, 2, 2, 150, 27, 3, 2, 2, 2, 151, 152, 7, 40, 2, 2, 152, 29, 3, 2, 2, 2, 153, 154, 7, 39, 2, 2, 154, 31, 3, 2, 2, 2, 155, 164, 7, 28, 2, 2, 156, 161, 5, 36, 19, 2, 157, 158, 7, 25, 2, 2, 158, 160, 5, 36, 19, 2, 159, 157, 3, 2, 2, 2, 160, 163, 3, 2, 2, 2, 161, 159, 3, 2, 2, 2, 161, 162, 3, 2, 2, 2, 162, 165, 3, 2, 2, 2, 163, 161, 3, 2, 2, 2, 164, 156, 3, 2, 2, 2, 164, 165, 3, 2, 2, 2, 165, 174, 3, 2, 2, 2, 166, 171, 5, 34, 18, 2, 167, 168, 7, 25, 2, 2, 168, 170, 5, 34, 18, 2, 169, 167, 3, 2, 2, 2, 170, 173, 3, 2, 2, 2, 171, 169, 3, 2, 2, 2, 171, 172, 3, 2, 2, 2, 172, 175, 3, 2, 2, 2, 173, 171, 3, 2, 2, 2, 174, 166, 3, 2, 2, 2, 174, 175, 3, 2, 2, 2, 175, 176, 3, 2, 2, 2, 176, 177, 7, 29, 2, 2, 177, 33, 3, 2, 2, 2, 178, 179, 7, 40, 2, 2, 179, 180, 7, 8, 2, 2, 180, 181, 5, 36, 19, 2, 181, 35, 3, 2, 2, 2, 182, 185, 5, 14, 8, 2, 183, 185, 5, 40, 21, 2, 184, 182, 3, 2, 2, 2, 184, 183, 3, 2, 2, 2, 185, 37, 3, 2, 2, 2, 186, 191, 7, 9, 2, 2, 187, 188, 7, 25, 2, 2, 188, 190, 7, 9, 2, 2, 189, 187, 3, 2, 2, 2, 190, 193, 3, 2, 2, 2, 191, 189, 3, 2, 2, 2, 191, 192, 3, 2, 2, 2, 192, 39, 3, 2, 2, 2, 193, 191, 3, 2, 2, 2, 194, 195, 8, 21, 1, 2, 195, 196, 7, 28, 2, 2, 196, 197, 5, 40, 21, 2, 197, 198, 7, 29, 2, 2, 198, 209, 3, 2, 2, 2, 199, 200, 9, 7, 2, 2, 200, 209, 5, 40, 21, 9, 201, 202, 5, 44, 23, 2, 202, 203, 7, 28, 2, 2, 203, 204, 5, 40, 21, 2, 204, 205, 7, 29, 2, 2, 205, 209, 3, 2, 2, 2, 206, 209, 5, 42, 22, 2, 207, 209, 7, 40, 2, 2, 208, 194, 3, 2, 2, 2, 208, 199, 3, 2, 2, 2, 208, 201, 3, 2, 2, 2, 208, 206, 3, 2, 2, 2, 208, 207, 3, 2, 2, 2, 209, 221, 3, 2, 2, 2, 210, 211, 12, 8, 2, 2, 211, 212, 7, 7, 2, 2, 212, 220, 5, 40, 21, 8, 213, 214, 12, 7, 2, 2, 214, 215, 9, 8, 2, 2, 215, 220, 5, 40, 21, 8, 216, 217, 12, 6, 2, 2, 217, 218, 9, 7, 2, 2, 218, 220, 5, 40, 21, 7, 219, 210, 3, 2, 2, 2, 219, 213, 3, 2, 2, 2, 219, 216, 3, 2, 2, 2, 220, 223, 3, 2, 2, 2, 221, 219, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 41, 3, 2, 2, 2, 223, 221, 3, 2, 2, 2, 224, 225, 9, 9, 2, 2, 225, 43, 3, 2, 2, 2, 226, 227, 9, 10, 2, 2, 227, 45, 3, 2, 2, 2, 26, 51, 59, 61, 69, 78, 95, 104, 112, 118, 126, 128, 136, 139, 143, 147, 161, 164, 171, 174, 184, 191, 208, 219, 221] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 63, 368, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 3, 2, 7, 2, 74, 10, 2, 12, 2, 14, 2, 77, 11, 2, 3, 2, 3, 2, 7, 2, 81, 10, 2, 12, 2, 14, 2, 84, 11, 2, 3, 2, 3, 2, 7, 2, 88, 10, 2, 12, 2, 14, 2, 91, 11, 2, 3, 2, 3, 2, 3, 3, 3, 3, 6, 3, 97, 10, 3, 13, 3, 14, 3, 98, 3, 3, 3, 3, 6, 3, 103, 10, 3, 13, 3, 14, 3, 104, 3, 3, 5, 3, 108, 10, 3, 3, 3, 6, 3, 111, 10, 3, 13, 3, 14, 3, 112, 3, 3, 5, 3, 116, 10, 3, 3, 3, 3, 3, 7, 3, 120, 10, 3, 12, 3, 14, 3, 123, 11, 3, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 5, 8, 138, 10, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 5, 10, 145, 10, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 157, 10, 13, 12, 13, 14, 13, 160, 11, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 167, 10, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 176, 10, 15, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 182, 10, 15, 3, 16, 3, 16, 5, 16, 186, 10, 16, 3, 17, 3, 17, 5, 17, 190, 10, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 7, 21, 201, 10, 21, 12, 21, 14, 21, 204, 11, 21, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 210, 10, 22, 12, 22, 14, 22, 213, 11, 22, 3, 23, 3, 23, 3, 23, 7, 23, 218, 10, 23, 12, 23, 14, 23, 221, 11, 23, 3, 24, 3, 24, 5, 24, 225, 10, 24, 3, 24, 5, 24, 228, 10, 24, 3, 24, 3, 24, 5, 24, 232, 10, 24, 3, 24, 3, 24, 5, 24, 236, 10, 24, 3, 24, 7, 24, 239, 10, 24, 12, 24, 14, 24, 242, 11, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 254, 10, 27, 3, 27, 3, 27, 5, 27, 258, 10, 27, 5, 27, 260, 10, 27, 3, 27, 3, 27, 3, 27, 6, 27, 265, 10, 27, 13, 27, 14, 27, 266, 3, 28, 3, 28, 3, 28, 3, 28, 7, 28, 273, 10, 28, 12, 28, 14, 28, 276, 11, 28, 5, 28, 278, 10, 28, 3, 28, 5, 28, 281, 10, 28, 3, 28, 3, 28, 3, 28, 7, 28, 286, 10, 28, 12, 28, 14, 28, 289, 11, 28, 5, 28, 291, 10, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 300, 10, 29, 3, 29, 5, 29, 303, 10, 29, 3, 30, 3, 30, 5, 30, 307, 10, 30, 3, 31, 3, 31, 3, 31, 7, 31, 312, 10, 31, 12, 31, 14, 31, 315, 11, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 5, 32, 322, 10, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 344, 10, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 7, 33, 355, 10, 33, 12, 33, 14, 33, 358, 11, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 2, 3, 64, 37, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 2, 13, 3, 2, 60, 61, 3, 2, 21, 24, 3, 2, 52, 57, 3, 2, 14, 15, 4, 2, 45, 45, 47, 47, 4, 2, 46, 46, 48, 48, 3, 2, 3, 4, 4, 2, 58, 58, 60, 60, 3, 2, 5, 6, 4, 2, 11, 13, 17, 17, 3, 2, 26, 40, 2, 385, 2, 75, 3, 2, 2, 2, 4, 94, 3, 2, 2, 2, 6, 124, 3, 2, 2, 2, 8, 127, 3, 2, 2, 2, 10, 129, 3, 2, 2, 2, 12, 132, 3, 2, 2, 2, 14, 134, 3, 2, 2, 2, 16, 139, 3, 2, 2, 2, 18, 141, 3, 2, 2, 2, 20, 146, 3, 2, 2, 2, 22, 148, 3, 2, 2, 2, 24, 158, 3, 2, 2, 2, 26, 161, 3, 2, 2, 2, 28, 168, 3, 2, 2, 2, 30, 185, 3, 2, 2, 2, 32, 189, 3, 2, 2, 2, 34, 191, 3, 2, 2, 2, 36, 193, 3, 2, 2, 2, 38, 195, 3, 2, 2, 2, 40, 197, 3, 2, 2, 2, 42, 211, 3, 2, 2, 2, 44, 214, 3, 2, 2, 2, 46, 224, 3, 2, 2, 2, 48, 243, 3, 2, 2, 2, 50, 245, 3, 2, 2, 2, 52, 247, 3, 2, 2, 2, 54, 268, 3, 2, 2, 2, 56, 294, 3, 2, 2, 2, 58, 306, 3, 2, 2, 2, 60, 308, 3, 2, 2, 2, 62, 316, 3, 2, 2, 2, 64, 343, 3, 2, 2, 2, 66, 359, 3, 2, 2, 2, 68, 363, 3, 2, 2, 2, 70, 365, 3, 2, 2, 2, 72, 74, 7, 18, 2, 2, 73, 72, 3, 2, 2, 2, 74, 77, 3, 2, 2, 2, 75, 73, 3, 2, 2, 2, 75, 76, 3, 2, 2, 2, 76, 78, 3, 2, 2, 2, 77, 75, 3, 2, 2, 2, 78, 82, 5, 4, 3, 2, 79, 81, 7, 18, 2, 2, 80, 79, 3, 2, 2, 2, 81, 84, 3, 2, 2, 2, 82, 80, 3, 2, 2, 2, 82, 83, 3, 2, 2, 2, 83, 85, 3, 2, 2, 2, 84, 82, 3, 2, 2, 2, 85, 89, 5, 24, 13, 2, 86, 88, 7, 18, 2, 2, 87, 86, 3, 2, 2, 2, 88, 91, 3, 2, 2, 2, 89, 87, 3, 2, 2, 2, 89, 90, 3, 2, 2, 2, 90, 92, 3, 2, 2, 2, 91, 89, 3, 2, 2, 2, 92, 93, 7, 2, 2, 3, 93, 3, 3, 2, 2, 2, 94, 96, 5, 6, 4, 2, 95, 97, 7, 18, 2, 2, 96, 95, 3, 2, 2, 2, 97, 98, 3, 2, 2, 2, 98, 96, 3, 2, 2, 2, 98, 99, 3, 2, 2, 2, 99, 100, 3, 2, 2, 2, 100, 107, 5, 10, 6, 2, 101, 103, 7, 18, 2, 2, 102, 101, 3, 2, 2, 2, 103, 104, 3, 2, 2, 2, 104, 102, 3, 2, 2, 2, 104, 105, 3, 2, 2, 2, 105, 106, 3, 2, 2, 2, 106, 108, 5, 14, 8, 2, 107, 102, 3, 2, 2, 2, 107, 108, 3, 2, 2, 2, 108, 115, 3, 2, 2, 2, 109, 111, 7, 18, 2, 2, 110, 109, 3, 2, 2, 2, 111, 112, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 112, 113, 3, 2, 2, 2, 113, 114, 3, 2, 2, 2, 114, 116, 5, 18, 10, 2, 115, 110, 3, 2, 2, 2, 115, 116, 3, 2, 2, 2, 116, 121, 3, 2, 2, 2, 117, 120, 7, 18, 2, 2, 118, 120, 5, 22, 12, 2, 119, 117, 3, 2, 2, 2, 119, 118, 3, 2, 2, 2, 120, 123, 3, 2, 2, 2, 121, 119, 3, 2, 2, 2, 121, 122, 3, 2, 2, 2, 122, 5, 3, 2, 2, 2, 123, 121, 3, 2, 2, 2, 124, 125, 7, 21, 2, 2, 125, 126, 5, 8, 5, 2, 126, 7, 3, 2, 2, 2, 127, 128, 7, 60, 2, 2, 128, 9, 3, 2, 2, 2, 129, 130, 7, 22, 2, 2, 130, 131, 5, 12, 7, 2, 131, 11, 3, 2, 2, 2, 132, 133, 7, 12, 2, 2, 133, 13, 3, 2, 2, 2, 134, 135, 7, 23, 2, 2, 135, 137, 5, 16, 9, 2, 136, 138, 5, 54, 28, 2, 137, 136, 3, 2, 2, 2, 137, 138, 3, 2, 2, 2, 138, 15, 3, 2, 2, 2, 139, 140, 9, 2, 2, 2, 140, 17, 3, 2, 2, 2, 141, 142, 7, 24, 2, 2, 142, 144, 5, 20, 11, 2, 143, 145, 5, 54, 28, 2, 144, 143, 3, 2, 2, 2, 144, 145, 3, 2, 2, 2, 145, 19, 3, 2, 2, 2, 146, 147, 7, 60, 2, 2, 147, 21, 3, 2, 2, 2, 148, 149, 7, 25, 2, 2, 149, 150, 7, 14, 2, 2, 150, 23, 3, 2, 2, 2, 151, 157, 7, 18, 2, 2, 152, 157, 5, 52, 27, 2, 153, 157, 5, 26, 14, 2, 154, 157, 5, 28, 15, 2, 155, 157, 5, 46, 24, 2, 156, 151, 3, 2, 2, 2, 156, 152, 3, 2, 2, 2, 156, 153, 3, 2, 2, 2, 156, 154, 3, 2, 2, 2, 156, 155, 3, 2, 2, 2, 157, 160, 3, 2, 2, 2, 158, 156, 3, 2, 2, 2, 158, 159, 3, 2, 2, 2, 159, 25, 3, 2, 2, 2, 160, 158, 3, 2, 2, 2, 161, 162, 5, 36, 19, 2, 162, 163, 5, 30, 16, 2, 163, 166, 7, 8, 2, 2, 164, 167, 5, 64, 33, 2, 165, 167, 5, 38, 20, 2, 166, 164, 3, 2, 2, 2, 166, 165, 3, 2, 2, 2, 167, 27, 3, 2, 2, 2, 168, 169, 5, 36, 19, 2, 169, 170, 7, 52, 2, 2, 170, 175, 5, 30, 16, 2, 171, 172, 7, 47, 2, 2, 172, 173, 5, 40, 21, 2, 173, 174, 7, 48, 2, 2, 174, 176, 3, 2, 2, 2, 175, 171, 3, 2, 2, 2, 175, 176, 3, 2, 2, 2, 176, 177, 3, 2, 2, 2, 177, 178, 7, 8, 2, 2, 178, 181, 7, 18, 2, 2, 179, 182, 5, 42, 22, 2, 180, 182, 5, 66, 34, 2, 181, 179, 3, 2, 2, 2, 181, 180, 3, 2, 2, 2, 182, 29, 3, 2, 2, 2, 183, 186, 5, 32, 17, 2, 184, 186, 7, 60, 2, 2, 185, 183, 3, 2, 2, 2, 185, 184, 3, 2, 2, 2, 186, 31, 3, 2, 2, 2, 187, 190, 7, 58, 2, 2, 188, 190, 5, 34, 18, 2, 189, 187, 3, 2, 2, 2, 189, 188, 3, 2, 2, 2, 190, 33, 3, 2, 2, 2, 191, 192, 9, 3, 2, 2, 192, 35, 3, 2, 2, 2, 193, 194, 9, 4, 2, 2, 194, 37, 3, 2, 2, 2, 195, 196, 9, 5, 2, 2, 196, 39, 3, 2, 2, 2, 197, 202, 7, 11, 2, 2, 198, 199, 7, 42, 2, 2, 199, 201, 7, 11, 2, 2, 200, 198, 3, 2, 2, 2, 201, 204, 3, 2, 2, 2, 202, 200, 3, 2, 2, 2, 202, 203, 3, 2, 2, 2, 203, 41, 3, 2, 2, 2, 204, 202, 3, 2, 2, 2, 205, 206, 7, 19, 2, 2, 206, 207, 5, 44, 23, 2, 207, 208, 7, 18, 2, 2, 208, 210, 3, 2, 2, 2, 209, 205, 3, 2, 2, 2, 210, 213, 3, 2, 2, 2, 211, 209, 3, 2, 2, 2, 211, 212, 3, 2, 2, 2, 212, 43, 3, 2, 2, 2, 213, 211, 3, 2, 2, 2, 214, 219, 5, 64, 33, 2, 215, 216, 7, 42, 2, 2, 216, 218, 5, 64, 33, 2, 217, 215, 3, 2, 2, 2, 218, 221, 3, 2, 2, 2, 219, 217, 3, 2, 2, 2, 219, 220, 3, 2, 2, 2, 220, 45, 3, 2, 2, 2, 221, 219, 3, 2, 2, 2, 222, 225, 5, 48, 25, 2, 223, 225, 5, 50, 26, 2, 224, 222, 3, 2, 2, 2, 224, 223, 3, 2, 2, 2, 225, 227, 3, 2, 2, 2, 226, 228, 5, 54, 28, 2, 227, 226, 3, 2, 2, 2, 227, 228, 3, 2, 2, 2, 228, 229, 3, 2, 2, 2, 229, 231, 7, 51, 2, 2, 230, 232, 9, 6, 2, 2, 231, 230, 3, 2, 2, 2, 231, 232, 3, 2, 2, 2, 232, 233, 3, 2, 2, 2, 233, 235, 5, 44, 23, 2, 234, 236, 9, 7, 2, 2, 235, 234, 3, 2, 2, 2, 235, 236, 3, 2, 2, 2, 236, 240, 3, 2, 2, 2, 237, 239, 7, 18, 2, 2, 238, 237, 3, 2, 2, 2, 239, 242, 3, 2, 2, 2, 240, 238, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 47, 3, 2, 2, 2, 242, 240, 3, 2, 2, 2, 243, 244, 7, 60, 2, 2, 244, 49, 3, 2, 2, 2, 245, 246, 7, 59, 2, 2, 246, 51, 3, 2, 2, 2, 247, 248, 7, 9, 2, 2, 248, 249, 5, 36, 19, 2, 249, 250, 7, 60, 2, 2, 250, 259, 7, 10, 2, 2, 251, 260, 5, 62, 32, 2, 252, 254, 9, 6, 2, 2, 253, 252, 3, 2, 2, 2, 253, 254, 3, 2, 2, 2, 254, 255, 3, 2, 2, 2, 255, 257, 5, 60, 31, 2, 256, 258, 9, 7, 2, 2, 257, 256, 3, 2, 2, 2, 257, 258, 3, 2, 2, 2, 258, 260, 3, 2, 2, 2, 259, 251, 3, 2, 2, 2, 259, 253, 3, 2, 2, 2, 260, 264, 3, 2, 2, 2, 261, 262, 7, 18, 2, 2, 262, 263, 7, 19, 2, 2, 263, 265, 5, 46, 24, 2, 264, 261, 3, 2, 2, 2, 265, 266, 3, 2, 2, 2, 266, 264, 3, 2, 2, 2, 266, 267, 3, 2, 2, 2, 267, 53, 3, 2, 2, 2, 268, 277, 7, 45, 2, 2, 269, 274, 5, 58, 30, 2, 270, 271, 7, 42, 2, 2, 271, 273, 5, 58, 30, 2, 272, 270, 3, 2, 2, 2, 273, 276, 3, 2, 2, 2, 274, 272, 3, 2, 2, 2, 274, 275, 3, 2, 2, 2, 275, 278, 3, 2, 2, 2, 276, 274, 3, 2, 2, 2, 277, 269, 3, 2, 2, 2, 277, 278, 3, 2, 2, 2, 278, 280, 3, 2, 2, 2, 279, 281, 7, 42, 2, 2, 280, 279, 3, 2, 2, 2, 280, 281, 3, 2, 2, 2, 281, 290, 3, 2, 2, 2, 282, 287, 5, 56, 29, 2, 283, 284, 7, 42, 2, 2, 284, 286, 5, 56, 29, 2, 285, 283, 3, 2, 2, 2, 286, 289, 3, 2, 2, 2, 287, 285, 3, 2, 2, 2, 287, 288, 3, 2, 2, 2, 288, 291, 3, 2, 2, 2, 289, 287, 3, 2, 2, 2, 290, 282, 3, 2, 2, 2, 290, 291, 3, 2, 2, 2, 291, 292, 3, 2, 2, 2, 292, 293, 7, 46, 2, 2, 293, 55, 3, 2, 2, 2, 294, 295, 7, 60, 2, 2, 295, 302, 7, 8, 2, 2, 296, 303, 5, 58, 30, 2, 297, 299, 7, 47, 2, 2, 298, 300, 5, 60, 31, 2, 299, 298, 3, 2, 2, 2, 299, 300, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 303, 7, 48, 2, 2, 302, 296, 3, 2, 2, 2, 302, 297, 3, 2, 2, 2, 303, 57, 3, 2, 2, 2, 304, 307, 5, 38, 20, 2, 305, 307, 5, 64, 33, 2, 306, 304, 3, 2, 2, 2, 306, 305, 3, 2, 2, 2, 307, 59, 3, 2, 2, 2, 308, 313, 5, 58, 30, 2, 309, 310, 7, 42, 2, 2, 310, 312, 5, 58, 30, 2, 311, 309, 3, 2, 2, 2, 312, 315, 3, 2, 2, 2, 313, 311, 3, 2, 2, 2, 313, 314, 3, 2, 2, 2, 314, 61, 3, 2, 2, 2, 315, 313, 3, 2, 2, 2, 316, 317, 7, 11, 2, 2, 317, 318, 7, 43, 2, 2, 318, 321, 7, 11, 2, 2, 319, 320, 7, 43, 2, 2, 320, 322, 7, 11, 2, 2, 321, 319, 3, 2, 2, 2, 321, 322, 3, 2, 2, 2, 322, 63, 3, 2, 2, 2, 323, 324, 8, 33, 1, 2, 324, 325, 7, 45, 2, 2, 325, 326, 5, 64, 33, 2, 326, 327, 7, 46, 2, 2, 327, 344, 3, 2, 2, 2, 328, 329, 9, 8, 2, 2, 329, 344, 5, 64, 33, 11, 330, 331, 5, 70, 36, 2, 331, 332, 7, 45, 2, 2, 332, 333, 5, 64, 33, 2, 333, 334, 7, 46, 2, 2, 334, 344, 3, 2, 2, 2, 335, 344, 5, 68, 35, 2, 336, 344, 9, 9, 2, 2, 337, 338, 7, 60, 2, 2, 338, 339, 7, 47, 2, 2, 339, 340, 5, 64, 33, 2, 340, 341, 7, 48, 2, 2, 341, 344, 3, 2, 2, 2, 342, 344, 5, 66, 34, 2, 343, 323, 3, 2, 2, 2, 343, 328, 3, 2, 2, 2, 343, 330, 3, 2, 2, 2, 343, 335, 3, 2, 2, 2, 343, 336, 3, 2, 2, 2, 343, 337, 3, 2, 2, 2, 343, 342, 3, 2, 2, 2, 344, 356, 3, 2, 2, 2, 345, 346, 12, 10, 2, 2, 346, 347, 7, 7, 2, 2, 347, 355, 5, 64, 33, 10, 348, 349, 12, 9, 2, 2, 349, 350, 9, 10, 2, 2, 350, 355, 5, 64, 33, 10, 351, 352, 12, 8, 2, 2, 352, 353, 9, 8, 2, 2, 353, 355, 5, 64, 33, 9, 354, 345, 3, 2, 2, 2, 354, 348, 3, 2, 2, 2, 354, 351, 3, 2, 2, 2, 355, 358, 3, 2, 2, 2, 356, 354, 3, 2, 2, 2, 356, 357, 3, 2, 2, 2, 357, 65, 3, 2, 2, 2, 358, 356, 3, 2, 2, 2, 359, 360, 7, 49, 2, 2, 360, 361, 7, 60, 2, 2, 361, 362, 7, 50, 2, 2, 362, 67, 3, 2, 2, 2, 363, 364, 9, 11, 2, 2, 364, 69, 3, 2, 2, 2, 365, 366, 9, 12, 2, 2, 366, 71, 3, 2, 2, 2, 46, 75, 82, 89, 98, 104, 107, 112, 115, 119, 121, 137, 144, 156, 158, 166, 175, 181, 185, 189, 202, 211, 219, 224, 227, 231, 235, 240, 253, 257, 259, 266, 274, 277, 280, 287, 290, 299, 302, 306, 313, 321, 343, 354, 356] \ No newline at end of file diff --git a/blackbird_cpp/blackbird.tokens b/blackbird_cpp/blackbird.tokens index c651ff8..b3fbc3f 100644 --- a/blackbird_cpp/blackbird.tokens +++ b/blackbird_cpp/blackbird.tokens @@ -4,65 +4,104 @@ TIMES=3 DIVIDE=4 PWR=5 ASSIGN=6 -INT=7 -FLOAT=8 -COMPLEX=9 -STR=10 -BOOL=11 -SEQUENCE=12 -PI=13 -NEWLINE=14 -TAB=15 -SPACE=16 -WITH=17 -SQRT=18 -SIN=19 -COS=20 -EXP=21 -PERIOD=22 -COMMA=23 -COLON=24 -QUOTE=25 -LBRAC=26 -RBRAC=27 -LSQBRAC=28 -RSQBRAC=29 -APPLY=30 -TYPE_ARRAY=31 -TYPE_FLOAT=32 -TYPE_COMPLEX=33 -TYPE_INT=34 -TYPE_STR=35 -TYPE_BOOL=36 -MEASURE=37 -NAME=38 -DEVICE=39 -COMMENT=40 -ANY=41 +FOR=7 +IN=8 +INT=9 +FLOAT=10 +COMPLEX=11 +STR=12 +BOOL=13 +SEQUENCE=14 +PI=15 +NEWLINE=16 +TAB=17 +SPACE=18 +PROGNAME=19 +VERSION=20 +TARGET=21 +PROGTYPE=22 +INCLUDE=23 +SQRT=24 +SIN=25 +COS=26 +TAN=27 +ARCSIN=28 +ARCCOS=29 +ARCTAN=30 +SINH=31 +COSH=32 +TANH=33 +ARCSINH=34 +ARCCOSH=35 +ARCTANH=36 +EXP=37 +LOG=38 +PERIOD=39 +COMMA=40 +COLON=41 +QUOTE=42 +LBRAC=43 +RBRAC=44 +LSQBRAC=45 +RSQBRAC=46 +LBRACE=47 +RBRACE=48 +APPLY=49 +TYPE_ARRAY=50 +TYPE_FLOAT=51 +TYPE_COMPLEX=52 +TYPE_INT=53 +TYPE_STR=54 +TYPE_BOOL=55 +REGREF=56 +MEASURE=57 +NAME=58 +DEVICE=59 +COMMENT=60 +ANY=61 '+'=1 '-'=2 '*'=3 '/'=4 '**'=5 '='=6 -'pi'=13 -'with'=17 -'sqrt'=18 -'sin'=19 -'cos'=20 -'exp'=21 -'.'=22 -','=23 -':'=24 -'"'=25 -'('=26 -')'=27 -'['=28 -']'=29 -'|'=30 -'array'=31 -'float'=32 -'complex'=33 -'int'=34 -'str'=35 -'bool'=36 +'for'=7 +'in'=8 +'pi'=15 +'name'=19 +'version'=20 +'target'=21 +'type'=22 +'include'=23 +'sqrt'=24 +'sin'=25 +'cos'=26 +'tan'=27 +'arcsin'=28 +'arccos'=29 +'arctan'=30 +'sinh'=31 +'cosh'=32 +'tanh'=33 +'arcsinh'=34 +'arccosh'=35 +'arctanh'=36 +'exp'=37 +'log'=38 +'.'=39 +','=40 +':'=41 +'"'=42 +'('=43 +')'=44 +'['=45 +']'=46 +'{'=47 +'}'=48 +'|'=49 +'array'=50 +'float'=51 +'complex'=52 +'int'=53 +'str'=54 +'bool'=55 diff --git a/blackbird_cpp/blackbirdBaseVisitor.cpp b/blackbird_cpp/blackbirdBaseVisitor.cpp index 456f6d0..57be705 100644 --- a/blackbird_cpp/blackbirdBaseVisitor.cpp +++ b/blackbird_cpp/blackbirdBaseVisitor.cpp @@ -1,5 +1,5 @@ -// Generated from blackbird.g4 by ANTLR 4.7.1 +// Generated from blackbird.g4 by ANTLR 4.9.2 #include "blackbirdBaseVisitor.h" diff --git a/blackbird_cpp/blackbirdBaseVisitor.h b/blackbird_cpp/blackbirdBaseVisitor.h index c15f662..3bad9d9 100644 --- a/blackbird_cpp/blackbirdBaseVisitor.h +++ b/blackbird_cpp/blackbirdBaseVisitor.h @@ -1,5 +1,5 @@ -// Generated from blackbird.g4 by ANTLR 4.7.1 +// Generated from blackbird.g4 by ANTLR 4.9.2 #pragma once @@ -19,7 +19,47 @@ class blackbirdBaseVisitor : public blackbirdVisitor { return visitChildren(ctx); } - virtual antlrcpp::Any visitVarblock(blackbirdParser::VarblockContext *ctx) override { + virtual antlrcpp::Any visitMetadatablock(blackbirdParser::MetadatablockContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitDeclarename(blackbirdParser::DeclarenameContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitProgramname(blackbirdParser::ProgramnameContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitVersion(blackbirdParser::VersionContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitVersionnumber(blackbirdParser::VersionnumberContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitTarget(blackbirdParser::TargetContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitDevice(blackbirdParser::DeviceContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitDeclaretype(blackbirdParser::DeclaretypeContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitProgramtype(blackbirdParser::ProgramtypeContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitInclude(blackbirdParser::IncludeContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitProgram(blackbirdParser::ProgramContext *ctx) override { return visitChildren(ctx); } @@ -35,31 +75,31 @@ class blackbirdBaseVisitor : public blackbirdVisitor { return visitChildren(ctx); } - virtual antlrcpp::Any visitVartype(blackbirdParser::VartypeContext *ctx) override { + virtual antlrcpp::Any visitInvalid(blackbirdParser::InvalidContext *ctx) override { return visitChildren(ctx); } - virtual antlrcpp::Any visitNonnumeric(blackbirdParser::NonnumericContext *ctx) override { + virtual antlrcpp::Any visitReserved(blackbirdParser::ReservedContext *ctx) override { return visitChildren(ctx); } - virtual antlrcpp::Any visitShape(blackbirdParser::ShapeContext *ctx) override { + virtual antlrcpp::Any visitVartype(blackbirdParser::VartypeContext *ctx) override { return visitChildren(ctx); } - virtual antlrcpp::Any visitArrayval(blackbirdParser::ArrayvalContext *ctx) override { + virtual antlrcpp::Any visitNonnumeric(blackbirdParser::NonnumericContext *ctx) override { return visitChildren(ctx); } - virtual antlrcpp::Any visitArrayrow(blackbirdParser::ArrayrowContext *ctx) override { + virtual antlrcpp::Any visitShape(blackbirdParser::ShapeContext *ctx) override { return visitChildren(ctx); } - virtual antlrcpp::Any visitProgram(blackbirdParser::ProgramContext *ctx) override { + virtual antlrcpp::Any visitArrayval(blackbirdParser::ArrayvalContext *ctx) override { return visitChildren(ctx); } - virtual antlrcpp::Any visitDevice(blackbirdParser::DeviceContext *ctx) override { + virtual antlrcpp::Any visitArrayrow(blackbirdParser::ArrayrowContext *ctx) override { return visitChildren(ctx); } @@ -75,6 +115,10 @@ class blackbirdBaseVisitor : public blackbirdVisitor { return visitChildren(ctx); } + virtual antlrcpp::Any visitForloop(blackbirdParser::ForloopContext *ctx) override { + return visitChildren(ctx); + } + virtual antlrcpp::Any visitArguments(blackbirdParser::ArgumentsContext *ctx) override { return visitChildren(ctx); } @@ -87,7 +131,15 @@ class blackbirdBaseVisitor : public blackbirdVisitor { return visitChildren(ctx); } - virtual antlrcpp::Any visitModes(blackbirdParser::ModesContext *ctx) override { + virtual antlrcpp::Any visitVallist(blackbirdParser::VallistContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitRangeval(blackbirdParser::RangevalContext *ctx) override { + return visitChildren(ctx); + } + + virtual antlrcpp::Any visitParameterLabel(blackbirdParser::ParameterLabelContext *ctx) override { return visitChildren(ctx); } @@ -111,6 +163,10 @@ class blackbirdBaseVisitor : public blackbirdVisitor { return visitChildren(ctx); } + virtual antlrcpp::Any visitArrayIdxLabel(blackbirdParser::ArrayIdxLabelContext *ctx) override { + return visitChildren(ctx); + } + virtual antlrcpp::Any visitMulLabel(blackbirdParser::MulLabelContext *ctx) override { return visitChildren(ctx); } @@ -123,6 +179,10 @@ class blackbirdBaseVisitor : public blackbirdVisitor { return visitChildren(ctx); } + virtual antlrcpp::Any visitParameter(blackbirdParser::ParameterContext *ctx) override { + return visitChildren(ctx); + } + virtual antlrcpp::Any visitNumber(blackbirdParser::NumberContext *ctx) override { return visitChildren(ctx); } diff --git a/blackbird_cpp/blackbirdLexer.cpp b/blackbird_cpp/blackbirdLexer.cpp index 9fe7bed..fe51f20 100644 --- a/blackbird_cpp/blackbirdLexer.cpp +++ b/blackbird_cpp/blackbirdLexer.cpp @@ -1,5 +1,5 @@ -// Generated from blackbird.g4 by ANTLR 4.7.1 +// Generated from blackbird.g4 by ANTLR 4.9.2 #include "blackbirdLexer.h" @@ -60,13 +60,15 @@ atn::ATN blackbirdLexer::_atn; std::vector blackbirdLexer::_serializedATN; std::vector blackbirdLexer::_ruleNames = { - u8"PLUS", u8"MINUS", u8"TIMES", u8"DIVIDE", u8"PWR", u8"ASSIGN", u8"DIGIT", - u8"REAL", u8"NUMBER", u8"IMAG", u8"INT", u8"FLOAT", u8"COMPLEX", u8"STR", - u8"BOOL", u8"SEQUENCE", u8"PI", u8"NEWLINE", u8"TAB", u8"SPACE", u8"WITH", - u8"SQRT", u8"SIN", u8"COS", u8"EXP", u8"PERIOD", u8"COMMA", u8"COLON", - u8"QUOTE", u8"LBRAC", u8"RBRAC", u8"LSQBRAC", u8"RSQBRAC", u8"APPLY", - u8"TYPE_ARRAY", u8"TYPE_FLOAT", u8"TYPE_COMPLEX", u8"TYPE_INT", u8"TYPE_STR", - u8"TYPE_BOOL", u8"MEASURE", u8"NAME", u8"DEVICE", u8"COMMENT", u8"ANY" + "PLUS", "MINUS", "TIMES", "DIVIDE", "PWR", "ASSIGN", "FOR", "IN", "DIGIT", + "REAL", "NUMBER", "IMAG", "INT", "FLOAT", "COMPLEX", "STR", "BOOL", "SEQUENCE", + "PI", "NEWLINE", "TAB", "SPACE", "PROGNAME", "VERSION", "TARGET", "PROGTYPE", + "INCLUDE", "SQRT", "SIN", "COS", "TAN", "ARCSIN", "ARCCOS", "ARCTAN", + "SINH", "COSH", "TANH", "ARCSINH", "ARCCOSH", "ARCTANH", "EXP", "LOG", + "PERIOD", "COMMA", "COLON", "QUOTE", "LBRAC", "RBRAC", "LSQBRAC", "RSQBRAC", + "LBRACE", "RBRACE", "APPLY", "TYPE_ARRAY", "TYPE_FLOAT", "TYPE_COMPLEX", + "TYPE_INT", "TYPE_STR", "TYPE_BOOL", "REGREF", "MEASURE", "NAME", "DEVICE", + "COMMENT", "ANY" }; std::vector blackbirdLexer::_channelNames = { @@ -74,25 +76,28 @@ std::vector blackbirdLexer::_channelNames = { }; std::vector blackbirdLexer::_modeNames = { - u8"DEFAULT_MODE" + "DEFAULT_MODE" }; std::vector blackbirdLexer::_literalNames = { - "", u8"'+'", u8"'-'", u8"'*'", u8"'/'", u8"'**'", u8"'='", "", "", "", - "", "", "", u8"'pi'", "", "", "", u8"'with'", u8"'sqrt'", u8"'sin'", u8"'cos'", - u8"'exp'", u8"'.'", u8"','", u8"':'", u8"'\"'", u8"'('", u8"')'", u8"'['", - u8"']'", u8"'|'", u8"'array'", u8"'float'", u8"'complex'", u8"'int'", - u8"'str'", u8"'bool'" + "", "'+'", "'-'", "'*'", "'/'", "'**'", "'='", "'for'", "'in'", "", "", + "", "", "", "", "'pi'", "", "", "", "'name'", "'version'", "'target'", + "'type'", "'include'", "'sqrt'", "'sin'", "'cos'", "'tan'", "'arcsin'", + "'arccos'", "'arctan'", "'sinh'", "'cosh'", "'tanh'", "'arcsinh'", "'arccosh'", + "'arctanh'", "'exp'", "'log'", "'.'", "','", "':'", "'\"'", "'('", "')'", + "'['", "']'", "'{'", "'}'", "'|'", "'array'", "'float'", "'complex'", + "'int'", "'str'", "'bool'" }; std::vector blackbirdLexer::_symbolicNames = { - "", u8"PLUS", u8"MINUS", u8"TIMES", u8"DIVIDE", u8"PWR", u8"ASSIGN", u8"INT", - u8"FLOAT", u8"COMPLEX", u8"STR", u8"BOOL", u8"SEQUENCE", u8"PI", u8"NEWLINE", - u8"TAB", u8"SPACE", u8"WITH", u8"SQRT", u8"SIN", u8"COS", u8"EXP", u8"PERIOD", - u8"COMMA", u8"COLON", u8"QUOTE", u8"LBRAC", u8"RBRAC", u8"LSQBRAC", u8"RSQBRAC", - u8"APPLY", u8"TYPE_ARRAY", u8"TYPE_FLOAT", u8"TYPE_COMPLEX", u8"TYPE_INT", - u8"TYPE_STR", u8"TYPE_BOOL", u8"MEASURE", u8"NAME", u8"DEVICE", u8"COMMENT", - u8"ANY" + "", "PLUS", "MINUS", "TIMES", "DIVIDE", "PWR", "ASSIGN", "FOR", "IN", + "INT", "FLOAT", "COMPLEX", "STR", "BOOL", "SEQUENCE", "PI", "NEWLINE", + "TAB", "SPACE", "PROGNAME", "VERSION", "TARGET", "PROGTYPE", "INCLUDE", + "SQRT", "SIN", "COS", "TAN", "ARCSIN", "ARCCOS", "ARCTAN", "SINH", "COSH", + "TANH", "ARCSINH", "ARCCOSH", "ARCTANH", "EXP", "LOG", "PERIOD", "COMMA", + "COLON", "QUOTE", "LBRAC", "RBRAC", "LSQBRAC", "RSQBRAC", "LBRACE", "RBRACE", + "APPLY", "TYPE_ARRAY", "TYPE_FLOAT", "TYPE_COMPLEX", "TYPE_INT", "TYPE_STR", + "TYPE_BOOL", "REGREF", "MEASURE", "NAME", "DEVICE", "COMMENT", "ANY" }; dfa::Vocabulary blackbirdLexer::_vocabulary(_literalNames, _symbolicNames); @@ -114,219 +119,337 @@ blackbirdLexer::Initializer::Initializer() { } } - _serializedATN = { + static const uint16_t serializedATNSegment0[] = { 0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964, - 0x2, 0x2b, 0x130, 0x8, 0x1, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, - 0x4, 0x4, 0x9, 0x4, 0x4, 0x5, 0x9, 0x5, 0x4, 0x6, 0x9, 0x6, 0x4, 0x7, - 0x9, 0x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xfe, 0xff, 0x7, 0x6b, 0x2, 0x2, 0xff, 0x100, 0x7, - 0x70, 0x2, 0x2, 0x100, 0x101, 0x7, 0x76, 0x2, 0x2, 0x101, 0x4e, 0x3, - 0x2, 0x2, 0x2, 0x102, 0x103, 0x7, 0x75, 0x2, 0x2, 0x103, 0x104, 0x7, - 0x76, 0x2, 0x2, 0x104, 0x105, 0x7, 0x74, 0x2, 0x2, 0x105, 0x50, 0x3, - 0x2, 0x2, 0x2, 0x106, 0x107, 0x7, 0x64, 0x2, 0x2, 0x107, 0x108, 0x7, - 0x71, 0x2, 0x2, 0x108, 0x109, 0x7, 0x71, 0x2, 0x2, 0x109, 0x10a, 0x7, - 0x6e, 0x2, 0x2, 0x10a, 0x52, 0x3, 0x2, 0x2, 0x2, 0x10b, 0x10c, 0x7, - 0x4f, 0x2, 0x2, 0x10c, 0x10d, 0x7, 0x67, 0x2, 0x2, 0x10d, 0x10e, 0x7, - 0x63, 0x2, 0x2, 0x10e, 0x10f, 0x7, 0x75, 0x2, 0x2, 0x10f, 0x110, 0x7, - 0x77, 0x2, 0x2, 0x110, 0x111, 0x7, 0x74, 0x2, 0x2, 0x111, 0x112, 0x7, - 0x67, 0x2, 0x2, 0x112, 0x116, 0x3, 0x2, 0x2, 0x2, 0x113, 0x115, 0x9, - 0x9, 0x2, 0x2, 0x114, 0x113, 0x3, 0x2, 0x2, 0x2, 0x115, 0x118, 0x3, - 0x2, 0x2, 0x2, 0x116, 0x114, 0x3, 0x2, 0x2, 0x2, 0x116, 0x117, 0x3, - 0x2, 0x2, 0x2, 0x117, 0x54, 0x3, 0x2, 0x2, 0x2, 0x118, 0x116, 0x3, 0x2, - 0x2, 0x2, 0x119, 0x11d, 0x9, 0x9, 0x2, 0x2, 0x11a, 0x11c, 0x9, 0xa, - 0x2, 0x2, 0x11b, 0x11a, 0x3, 0x2, 0x2, 0x2, 0x11c, 0x11f, 0x3, 0x2, - 0x2, 0x2, 0x11d, 0x11b, 0x3, 0x2, 0x2,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3, 0x2, + 0x2, 0x2, 0x10a, 0x10b, 0x7, 0x6b, 0x2, 0x2, 0x10b, 0x10c, 0x7, 0x70, + 0x2, 0x2, 0x10c, 0x10d, 0x7, 0x65, 0x2, 0x2, 0x10d, 0x10e, 0x7, 0x6e, + 0x2, 0x2, 0x10e, 0x10f, 0x7, 0x77, 0x2, 0x2, 0x10f, 0x110, 0x7, 0x66, + 0x2, 0x2, 0x110, 0x111, 0x7, 0x67, 0x2, 0x2, 0x111, 0x38, 0x3, 0x2, + 0x2, 0x2, 0x112, 0x113, 0x7, 0x75, 0x2, 0x2, 0x113, 0x114, 0x7, 0x73, + 0x2, 0x2, 0x114, 0x115, 0x7, 0x74, 0x2, 0x2, 0x115, 0x116, 0x7, 0x76, + 0x2, 0x2, 0x116, 0x3a, 0x3, 0x2, 0x2, 0x2, 0x117, 0x118, 0x7, 0x75, + 0x2, 0x2, 0x118, 0x119, 0x7, 0x6b, 0x2, 0x2, 0x119, 0x11a, 0x7, 0x70, + 0x2, 0x2, 0x11a, 0x3c, 0x3, 0x2, 0x2, 0x2, 0x11b, 0x11c, 0x7, 0x65, + 0x2, 0x2, 0x11c, 0x11d, 0x7, 0x71, 0x2, 0x2, 0x11d, 0x11e, 0x7, 0x75, + 0x2, 0x2, 0x11e, 0x3e, 0x3, 0x2, 0x2, 0x2, 0x11f, 0x120, 0x7, 0x76, + 0x2, 0x2, 0x120, 0x121, 0x7, 0x63, 0x2, 0x2, 0x121, 0x122, 0x7, 0x70, + 0x2, 0x2, 0x122, 0x40, 0x3, 0x2, 0x2, 0x2, 0x123, 0x124, 0x7, 0x63, + 0x2, 0x2, 0x124, 0x125, 0x7, 0x74, 0x2, 0x2, 0x125, 0x126, 0x7, 0x65, + 0x2, 0x2, 0x126, 0x127, 0x7, 0x75, 0x2, 0x2, 0x127, 0x128, 0x7, 0x6b, + 0x2, 0x2, 0x128, 0x129, 0x7, 0x70, 0x2, 0x2, 0x129, 0x42, 0x3, 0x2, + 0x2, 0x2, 0x12a, 0x12b, 0x7, 0x63, 0x2, 0x2, 0x12b, 0x12c, 0x7, 0x74, + 0x2, 0x2, 0x12c, 0x12d, 0x7, 0x65, 0x2, 0x2, 0x12d, 0x12e, 0x7, 0x65, + 0x2, 0x2, 0x12e, 0x12f, 0x7, 0x71, 0x2, 0x2, 0x12f, 0x130, 0x7, 0x75, + 0x2, 0x2, 0x130, 0x44, 0x3, 0x2, 0x2, 0x2, 0x131, 0x132, 0x7, 0x63, + 0x2, 0x2, 0x132, 0x133, 0x7, 0x74, 0x2, 0x2, 0x133, 0x134, 0x7, 0x65, + 0x2, 0x2, 0x134, 0x135, 0x7, 0x76, 0x2, 0x2, 0x135, 0x136, 0x7, 0x63, + 0x2, 0x2, 0x136, 0x137, 0x7, 0x70, 0x2, 0x2, 0x137, 0x46, 0x3, 0x2, + 0x2, 0x2, 0x138, 0x139, 0x7, 0x75, 0x2, 0x2, 0x139, 0x13a, 0x7, 0x6b, + 0x2, 0x2, 0x13a, 0x13b, 0x7, 0x70, 0x2, 0x2, 0x13b, 0x13c, 0x7, 0x6a, + 0x2, 0x2, 0x13c, 0x48, 0x3, 0x2, 0x2, 0x2, 0x13d, 0x13e, 0x7, 0x65, + 0x2, 0x2, 0x13e, 0x13f, 0x7, 0x71, 0x2, 0x2, 0x13f, 0x140, 0x7, 0x75, + 0x2, 0x2, 0x140, 0x141, 0x7, 0x6a, 0x2, 0x2, 0x141, 0x4a, 0x3, 0x2, + 0x2, 0x2, 0x142, 0x143, 0x7, 0x76, 0x2, 0x2, 0x143, 0x144, 0x7, 0x63, + 0x2, 0x2, 0x144, 0x145, 0x7, 0x70, 0x2, 0x2, 0x145, 0x146, 0x7, 0x6a, + 0x2, 0x2, 0x146, 0x4c, 0x3, 0x2, 0x2, 0x2, 0x147, 0x148, 0x7, 0x63, + 0x2, 0x2, 0x148, 0x149, 0x7, 0x74, 0x2, 0x2, 0x149, 0x14a, 0x7, 0x65, + 0x2, 0x2, 0x14a, 0x14b, 0x7, 0x75, 0x2, 0x2, 0x14b, 0x14c, 0x7, 0x6b, + 0x2, 0x2, 0x14c, 0x14d, 0x7, 0x70, 0x2, 0x2, 0x14d, 0x14e, 0x7, 0x6a, + 0x2, 0x2, 0x14e, 0x4e, 0x3, 0x2, 0x2, 0x2, 0x14f, 0x150, 0x7, 0x63, + 0x2, 0x2, 0x150, 0x151, 0x7, 0x74, 0x2, 0x2, 0x151, 0x152, 0x7, 0x65, + 0x2, 0x2, 0x152, 0x153, 0x7, 0x65, 0x2, 0x2, 0x153, 0x154, 0x7, 0x71, + 0x2, 0x2, 0x154, 0x155, 0x7, 0x75, 0x2, 0x2, 0x155, 0x156, 0x7, 0x6a, + 0x2, 0x2, 0x156, 0x50, 0x3, 0x2, 0x2, 0x2, 0x157, 0x158, 0x7, 0x63, + 0x2, 0x2, 0x158, 0x159, 0x7, 0x74, 0x2, 0x2, 0x159, 0x15a, 0x7, 0x65, + 0x2, 0x2, 0x15a, 0x15b, 0x7, 0x76, 0x2, 0x2, 0x15b, 0x15c, 0x7, 0x63, + 0x2, 0x2, 0x15c, 0x15d, 0x7, 0x70, 0x2, 0x2, 0x15d, 0x15e, 0x7, 0x6a, + 0x2, 0x2, 0x15e, 0x52, 0x3, 0x2, 0x2, 0x2, 0x15f, 0x160, 0x7, 0x67, + 0x2, 0x2, 0x160, 0x161, 0x7, 0x7a, 0x2, 0x2, 0x161, 0x162, 0x7, 0x72, + 0x2, 0x2, 0x162, 0x54, 0x3, 0x2, 0x2, 0x2, 0x163, 0x164, 0x7, 0x6e, + 0x2, 0x2, 0x164, 0x165, 0x7, 0x71, 0x2, 0x2, 0x165, 0x166, 0x7, 0x69, + 0x2, 0x2, 0x166, 0x56, 0x3, 0x2, 0x2, 0x2, 0x167, 0x168, 0x7, 0x30, + 0x2, 0x2, 0x168, 0x58, 0x3, 0x2, 0x2, 0x2, 0x169, 0x16a, 0x7, 0x2e, + 0x2, 0x2, 0x16a, 0x5a, 0x3, 0x2, 0x2, 0x2, 0x16b, 0x16c, 0x7, 0x3c, + 0x2, 0x2, 0x16c, 0x5c, 0x3, 0x2, 0x2, 0x2, 0x16d, 0x16e, 0x7, 0x24, + 0x2, 0x2, 0x16e, 0x5e, 0x3, 0x2, 0x2, 0x2, 0x16f, 0x170, 0x7, 0x2a, + 0x2, 0x2, 0x170, 0x60, 0x3, 0x2, 0x2, 0x2, 0x171, 0x172, 0x7, 0x2b, + 0x2, 0x2, 0x172, 0x62, 0x3, 0x2, 0x2, 0x2, 0x173, 0x174, 0x7, 0x5d, + 0x2, 0x2, 0x174, 0x64, 0x3, 0x2, 0x2, 0x2, 0x175, 0x176, 0x7, 0x5f, + 0x2, 0x2, 0x176, 0x66, 0x3, 0x2, 0x2, 0x2, 0x177, 0x178, 0x7, 0x7d, + 0x2, 0x2, 0x178, 0x68, 0x3, 0x2, 0x2, 0x2, 0x179, 0x17a, 0x7, 0x7f, + 0x2, 0x2, 0x17a, 0x6a, 0x3, 0x2, 0x2, 0x2, 0x17b, 0x17c, 0x7, 0x7e, + 0x2, 0x2, 0x17c, 0x6c, 0x3, 0x2, 0x2, 0x2, 0x17d, 0x17e, 0x7, 0x63, + 0x2, 0x2, 0x17e, 0x17f, 0x7, 0x74, 0x2, 0x2, 0x17f, 0x180, 0x7, 0x74, + 0x2, 0x2, 0x180, 0x181, 0x7, 0x63, 0x2, 0x2, 0x181, 0x182, 0x7, 0x7b, + 0x2, 0x2, 0x182, 0x6e, 0x3, 0x2, 0x2, 0x2, 0x183, 0x184, 0x7, 0x68, + 0x2, 0x2, 0x184, 0x185, 0x7, 0x6e, 0x2, 0x2, 0x185, 0x186, 0x7, 0x71, + 0x2, 0x2, 0x186, 0x187, 0x7, 0x63, 0x2, 0x2, 0x187, 0x188, 0x7, 0x76, + 0x2, 0x2, 0x188, 0x70, 0x3, 0x2, 0x2, 0x2, 0x189, 0x18a, 0x7, 0x65, + 0x2, 0x2, 0x18a, 0x18b, 0x7, 0x71, 0x2, 0x2, 0x18b, 0x18c, 0x7, 0x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 0x2, 0x1c5, 0x84, 0x3, 0x2, + 0x2, 0x2, 0x14, 0x2, 0x9c, 0xa1, 0xa5, 0xa8, 0xac, 0xb6, 0xbb, 0xc3, + 0xd1, 0xd8, 0xe1, 0xe8, 0xed, 0x1ac, 0x1b3, 0x1b9, 0x1bf, 0x3, 0x8, + 0x2, 0x2, }; + _serializedATN.insert(_serializedATN.end(), serializedATNSegment0, + serializedATNSegment0 + sizeof(serializedATNSegment0) / sizeof(serializedATNSegment0[0])); + + atn::ATNDeserializer deserializer; _atn = deserializer.deserialize(_serializedATN); diff --git a/blackbird_cpp/blackbirdLexer.h b/blackbird_cpp/blackbirdLexer.h index f3fb1e8..3c07fc5 100644 --- a/blackbird_cpp/blackbirdLexer.h +++ b/blackbird_cpp/blackbirdLexer.h @@ -1,5 +1,5 @@ -// Generated from blackbird.g4 by ANTLR 4.7.1 +// Generated from blackbird.g4 by ANTLR 4.9.2 #pragma once @@ -12,16 +12,19 @@ class blackbirdLexer : public antlr4::Lexer { public: enum { - PLUS = 1, MINUS = 2, TIMES = 3, DIVIDE = 4, PWR = 5, ASSIGN = 6, INT = 7, - FLOAT = 8, COMPLEX = 9, STR = 10, BOOL = 11, SEQUENCE = 12, PI = 13, - NEWLINE = 14, TAB = 15, SPACE = 16, WITH = 17, SQRT = 18, SIN = 19, - COS = 20, EXP = 21, PERIOD = 22, COMMA = 23, COLON = 24, QUOTE = 25, - LBRAC = 26, RBRAC = 27, LSQBRAC = 28, RSQBRAC = 29, APPLY = 30, TYPE_ARRAY = 31, - TYPE_FLOAT = 32, TYPE_COMPLEX = 33, TYPE_INT = 34, TYPE_STR = 35, TYPE_BOOL = 36, - MEASURE = 37, NAME = 38, DEVICE = 39, COMMENT = 40, ANY = 41 + PLUS = 1, MINUS = 2, TIMES = 3, DIVIDE = 4, PWR = 5, ASSIGN = 6, FOR = 7, + IN = 8, INT = 9, FLOAT = 10, COMPLEX = 11, STR = 12, BOOL = 13, SEQUENCE = 14, + PI = 15, NEWLINE = 16, TAB = 17, SPACE = 18, PROGNAME = 19, VERSION = 20, + TARGET = 21, PROGTYPE = 22, INCLUDE = 23, SQRT = 24, SIN = 25, COS = 26, + TAN = 27, ARCSIN = 28, ARCCOS = 29, ARCTAN = 30, SINH = 31, COSH = 32, + TANH = 33, ARCSINH = 34, ARCCOSH = 35, ARCTANH = 36, EXP = 37, LOG = 38, + PERIOD = 39, COMMA = 40, COLON = 41, QUOTE = 42, LBRAC = 43, RBRAC = 44, + LSQBRAC = 45, RSQBRAC = 46, LBRACE = 47, RBRACE = 48, APPLY = 49, TYPE_ARRAY = 50, + TYPE_FLOAT = 51, TYPE_COMPLEX = 52, TYPE_INT = 53, TYPE_STR = 54, TYPE_BOOL = 55, + REGREF = 56, MEASURE = 57, NAME = 58, DEVICE = 59, COMMENT = 60, ANY = 61 }; - blackbirdLexer(antlr4::CharStream *input); + explicit blackbirdLexer(antlr4::CharStream *input); ~blackbirdLexer(); virtual std::string getGrammarFileName() const override; diff --git a/blackbird_cpp/blackbirdLexer.interp b/blackbird_cpp/blackbirdLexer.interp index 21cee51..f57d5de 100644 --- a/blackbird_cpp/blackbirdLexer.interp +++ b/blackbird_cpp/blackbirdLexer.interp @@ -6,6 +6,8 @@ null '/' '**' '=' +'for' +'in' null null null @@ -16,11 +18,26 @@ null null null null -'with' +'name' +'version' +'target' +'type' +'include' 'sqrt' 'sin' 'cos' +'tan' +'arcsin' +'arccos' +'arctan' +'sinh' +'cosh' +'tanh' +'arcsinh' +'arccosh' +'arctanh' 'exp' +'log' '.' ',' ':' @@ -29,6 +46,8 @@ null ')' '[' ']' +'{' +'}' '|' 'array' 'float' @@ -41,6 +60,7 @@ null null null null +null token symbolic names: null @@ -50,6 +70,8 @@ TIMES DIVIDE PWR ASSIGN +FOR +IN INT FLOAT COMPLEX @@ -60,11 +82,26 @@ PI NEWLINE TAB SPACE -WITH +PROGNAME +VERSION +TARGET +PROGTYPE +INCLUDE SQRT SIN COS +TAN +ARCSIN +ARCCOS +ARCTAN +SINH +COSH +TANH +ARCSINH +ARCCOSH +ARCTANH EXP +LOG PERIOD COMMA COLON @@ -73,6 +110,8 @@ LBRAC RBRAC LSQBRAC RSQBRAC +LBRACE +RBRACE APPLY TYPE_ARRAY TYPE_FLOAT @@ -80,6 +119,7 @@ TYPE_COMPLEX TYPE_INT TYPE_STR TYPE_BOOL +REGREF MEASURE NAME DEVICE @@ -93,6 +133,8 @@ TIMES DIVIDE PWR ASSIGN +FOR +IN DIGIT REAL NUMBER @@ -107,11 +149,26 @@ PI NEWLINE TAB SPACE -WITH +PROGNAME +VERSION +TARGET +PROGTYPE +INCLUDE SQRT SIN COS +TAN +ARCSIN +ARCCOS +ARCTAN +SINH +COSH +TANH +ARCSINH +ARCCOSH +ARCTANH EXP +LOG PERIOD COMMA COLON @@ -120,6 +177,8 @@ LBRAC RBRAC LSQBRAC RSQBRAC +LBRACE +RBRACE APPLY TYPE_ARRAY TYPE_FLOAT @@ -127,6 +186,7 @@ TYPE_COMPLEX TYPE_INT TYPE_STR TYPE_BOOL +REGREF MEASURE NAME DEVICE @@ -141,4 +201,4 @@ mode names: DEFAULT_MODE atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 43, 304, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 6, 8, 108, 10, 8, 13, 8, 14, 8, 109, 3, 9, 3, 9, 3, 9, 5, 9, 115, 10, 9, 3, 9, 3, 9, 5, 9, 119, 10, 9, 3, 9, 5, 9, 122, 10, 9, 3, 10, 3, 10, 5, 10, 126, 10, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 5, 14, 136, 10, 14, 3, 14, 3, 14, 3, 14, 5, 14, 141, 10, 14, 3, 14, 3, 14, 3, 15, 3, 15, 7, 15, 147, 10, 15, 12, 15, 14, 15, 150, 11, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 163, 10, 16, 3, 17, 3, 17, 3, 17, 7, 17, 168, 10, 17, 12, 17, 14, 17, 171, 11, 17, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 5, 19, 179, 10, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 5, 20, 186, 10, 20, 3, 21, 6, 21, 189, 10, 21, 13, 21, 14, 21, 190, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 7, 42, 277, 10, 42, 12, 42, 14, 42, 280, 11, 42, 3, 43, 3, 43, 7, 43, 284, 10, 43, 12, 43, 14, 43, 287, 11, 43, 3, 44, 6, 44, 290, 10, 44, 13, 44, 14, 44, 291, 3, 45, 3, 45, 7, 45, 296, 10, 45, 12, 45, 14, 45, 299, 11, 45, 3, 45, 3, 45, 3, 46, 3, 46, 2, 2, 47, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 2, 17, 2, 19, 2, 21, 2, 23, 9, 25, 10, 27, 11, 29, 12, 31, 13, 33, 14, 35, 15, 37, 16, 39, 17, 41, 18, 43, 19, 45, 20, 47, 21, 49, 22, 51, 23, 53, 24, 55, 25, 57, 26, 59, 27, 61, 28, 63, 29, 65, 30, 67, 31, 69, 32, 71, 33, 73, 34, 75, 35, 77, 36, 79, 37, 81, 38, 83, 39, 85, 40, 87, 41, 89, 42, 91, 43, 3, 2, 13, 3, 2, 50, 59, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 76, 76, 108, 108, 5, 2, 12, 12, 15, 15, 36, 36, 4, 2, 12, 12, 116, 116, 4, 2, 11, 11, 34, 34, 4, 2, 67, 92, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 7, 2, 48, 48, 50, 59, 67, 92, 97, 97, 99, 124, 4, 2, 12, 12, 15, 15, 2, 316, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2,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2, 2, 39, 185, 3, 2, 2, 2, 41, 188, 3, 2, 2, 2, 43, 194, 3, 2, 2, 2, 45, 199, 3, 2, 2, 2, 47, 204, 3, 2, 2, 2, 49, 208, 3, 2, 2, 2, 51, 212, 3, 2, 2, 2, 53, 216, 3, 2, 2, 2, 55, 218, 3, 2, 2, 2, 57, 220, 3, 2, 2, 2, 59, 222, 3, 2, 2, 2, 61, 224, 3, 2, 2, 2, 63, 226, 3, 2, 2, 2, 65, 228, 3, 2, 2, 2, 67, 230, 3, 2, 2, 2, 69, 232, 3, 2, 2, 2, 71, 234, 3, 2, 2, 2, 73, 240, 3, 2, 2, 2, 75, 246, 3, 2, 2, 2, 77, 254, 3, 2, 2, 2, 79, 258, 3, 2, 2, 2, 81, 262, 3, 2, 2, 2, 83, 267, 3, 2, 2, 2, 85, 281, 3, 2, 2, 2, 87, 289, 3, 2, 2, 2, 89, 293, 3, 2, 2, 2, 91, 302, 3, 2, 2, 2, 93, 94, 7, 45, 2, 2, 94, 4, 3, 2, 2, 2, 95, 96, 7, 47, 2, 2, 96, 6, 3, 2, 2, 2, 97, 98, 7, 44, 2, 2, 98, 8, 3, 2, 2, 2, 99, 100, 7, 49, 2, 2, 100, 10, 3, 2, 2, 2, 101, 102, 7, 44, 2, 2, 102, 103, 7, 44, 2, 2, 103, 12, 3, 2, 2, 2, 104, 105, 7, 63, 2, 2, 105, 14, 3, 2, 2, 2, 106, 108, 9, 2, 2, 2, 107, 106, 3, 2, 2, 2, 108, 109, 3, 2, 2, 2, 109, 107, 3, 2, 2, 2, 109, 110, 3, 2, 2, 2, 110, 16, 3, 2, 2, 2, 111, 114, 5, 15, 8, 2, 112, 113, 7, 48, 2, 2, 113, 115, 5, 15, 8, 2, 114, 112, 3, 2, 2, 2, 114, 115, 3, 2, 2, 2, 115, 121, 3, 2, 2, 2, 116, 118, 9, 3, 2, 2, 117, 119, 9, 4, 2, 2, 118, 117, 3, 2, 2, 2, 118, 119, 3, 2, 2, 2, 119, 120, 3, 2, 2, 2, 120, 122, 5, 15, 8, 2, 121, 116, 3, 2, 2, 2, 121, 122, 3, 2, 2, 2, 122, 18, 3, 2, 2, 2, 123, 126, 5, 17, 9, 2, 124, 126, 5, 15, 8, 2, 125, 123, 3, 2, 2, 2, 125, 124, 3, 2, 2, 2, 126, 20, 3, 2, 2, 2, 127, 128, 5, 19, 10, 2, 128, 129, 9, 5, 2, 2, 129, 22, 3, 2, 2, 2, 130, 131, 5, 15, 8, 2, 131, 24, 3, 2, 2, 2, 132, 133, 5, 17, 9, 2, 133, 26, 3, 2, 2, 2, 134, 136, 9, 4, 2, 2, 135, 134, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136, 140, 3, 2, 2, 2, 137, 138, 5, 19, 10, 2, 138, 139, 9, 4, 2, 2, 139, 141, 3, 2, 2, 2, 140, 137, 3, 2, 2, 2, 140, 141, 3, 2, 2, 2, 141, 142, 3, 2, 2, 2, 142, 143, 5, 21, 11, 2, 143, 28, 3, 2, 2, 2, 144, 148, 7, 36, 2, 2, 145, 147, 10, 6, 2, 2, 146, 145, 3, 2, 2, 2, 147, 150, 3, 2, 2, 2, 148, 146, 3, 2, 2, 2, 148, 149, 3, 2, 2, 2, 149, 151, 3, 2, 2, 2, 150, 148, 3, 2, 2, 2, 151, 152, 7, 36, 2, 2, 152, 30, 3, 2, 2, 2, 153, 154, 7, 86, 2, 2, 154, 155, 7, 116, 2, 2, 155, 156, 7, 119, 2, 2, 156, 163, 7, 103, 2, 2, 157, 158, 7, 72, 2, 2, 158, 159, 7, 99, 2, 2, 159, 160, 7, 110, 2, 2, 160, 161, 7, 117, 2, 2, 161, 163, 7, 103, 2, 2, 162, 153, 3, 2, 2, 2, 162, 157, 3, 2, 2, 2, 163, 32, 3, 2, 2, 2, 164, 169, 5, 19, 10, 2, 165, 166, 7, 46, 2, 2, 166, 168, 5, 19, 10, 2, 167, 165, 3, 2, 2, 2, 168, 171, 3, 2, 2, 2, 169, 167, 3, 2, 2, 2, 169, 170, 3, 2, 2, 2, 170, 34, 3, 2, 2, 2, 171, 169, 3, 2, 2, 2, 172, 173, 7, 114, 2, 2, 173, 174, 7, 107, 2, 2, 174, 36, 3, 2, 2, 2, 175, 176, 7, 15, 2, 2, 176, 179, 7, 12, 2, 2, 177, 179, 9, 7, 2, 2, 178, 175, 3, 2, 2, 2, 178, 177, 3, 2, 2, 2, 179, 38, 3, 2, 2, 2, 180, 186, 7, 11, 2, 2, 181, 182, 7, 34, 2, 2, 182, 183, 7, 34, 2, 2, 183, 184, 7, 34, 2, 2, 184, 186, 7, 34, 2, 2, 185, 180, 3, 2, 2, 2, 185, 181, 3, 2, 2, 2, 186, 40, 3, 2, 2, 2, 187, 189, 9, 8, 2, 2, 188, 187, 3, 2, 2, 2, 189, 190, 3, 2, 2, 2, 190, 188, 3, 2, 2, 2, 190, 191, 3, 2, 2, 2, 191, 192, 3, 2, 2, 2, 192, 193, 8, 21, 2, 2, 193, 42, 3, 2, 2, 2, 194, 195, 7, 121, 2, 2, 195, 196, 7, 107, 2, 2, 196, 197, 7, 118, 2, 2, 197, 198, 7, 106, 2, 2, 198, 44, 3, 2, 2, 2, 199, 200, 7, 117, 2, 2, 200, 201, 7, 115, 2, 2, 201, 202, 7, 116, 2, 2, 202, 203, 7, 118, 2, 2, 203, 46, 3, 2, 2, 2, 204, 205, 7, 117, 2, 2, 205, 206, 7, 107, 2, 2, 206, 207, 7, 112, 2, 2, 207, 48, 3, 2, 2, 2, 208, 209, 7, 101, 2, 2, 209, 210, 7, 113, 2, 2, 210, 211, 7, 117, 2, 2, 211, 50, 3, 2, 2, 2, 212, 213, 7, 103, 2, 2, 213, 214, 7, 122, 2, 2, 214, 215, 7, 114, 2, 2, 215, 52, 3, 2, 2, 2, 216, 217, 7, 48, 2, 2, 217, 54, 3, 2, 2, 2, 218, 219, 7, 46, 2, 2, 219, 56, 3, 2, 2, 2, 220, 221, 7, 60, 2, 2, 221, 58, 3, 2, 2, 2, 222, 223, 7, 36, 2, 2, 223, 60, 3, 2, 2, 2, 224, 225, 7, 42, 2, 2, 225, 62, 3, 2, 2, 2, 226, 227, 7, 43, 2, 2, 227, 64, 3, 2, 2, 2, 228, 229, 7, 93, 2, 2, 229, 66, 3, 2, 2, 2, 230, 231, 7, 95, 2, 2, 231, 68, 3, 2, 2, 2, 232, 233, 7, 126, 2, 2, 233, 70, 3, 2, 2, 2, 234, 235, 7, 99, 2, 2, 235, 236, 7, 116, 2, 2, 236, 237, 7, 116, 2, 2, 237, 238, 7, 99, 2, 2, 238, 239, 7, 123, 2, 2, 239, 72, 3, 2, 2, 2, 240, 241, 7, 104, 2, 2, 241, 242, 7, 110, 2, 2, 242, 243, 7, 113, 2, 2, 243, 244, 7, 99, 2, 2, 244, 245, 7, 118, 2, 2, 245, 74, 3, 2, 2, 2, 246, 247, 7, 101, 2, 2, 247, 248, 7, 113, 2, 2, 248, 249, 7, 111, 2, 2, 249, 250, 7, 114, 2, 2, 250, 251, 7, 110, 2, 2, 251, 252, 7, 103, 2, 2, 252, 253, 7, 122, 2, 2, 253, 76, 3, 2, 2, 2, 254, 255, 7, 107, 2, 2, 255, 256, 7, 112, 2, 2, 256, 257, 7, 118, 2, 2, 257, 78, 3, 2, 2, 2, 258, 259, 7, 117, 2, 2, 259, 260, 7, 118, 2, 2, 260, 261, 7, 116, 2, 2, 261, 80, 3, 2, 2, 2, 262, 263, 7, 100, 2, 2, 263, 264, 7, 113, 2, 2, 264, 265, 7, 113, 2, 2, 265, 266, 7, 110, 2, 2, 266, 82, 3, 2, 2, 2, 267, 268, 7, 79, 2, 2, 268, 269, 7, 103, 2, 2, 269, 270, 7, 99, 2, 2, 270, 271, 7, 117, 2, 2, 271, 272, 7, 119, 2, 2, 272, 273, 7, 116, 2, 2, 273, 274, 7, 103, 2, 2, 274, 278, 3, 2, 2, 2, 275, 277, 9, 9, 2, 2, 276, 275, 3, 2, 2, 2, 277, 280, 3, 2, 2, 2, 278, 276, 3, 2, 2, 2, 278, 279, 3, 2, 2, 2, 279, 84, 3, 2, 2, 2, 280, 278, 3, 2, 2, 2, 281, 285, 9, 9, 2, 2, 282, 284, 9, 10, 2, 2, 283, 282, 3, 2, 2, 2, 284, 287, 3, 2, 2, 2, 285, 283, 3, 2, 2, 2, 285, 286, 3, 2, 2, 2, 286, 86, 3, 2, 2, 2, 287, 285, 3, 2, 2, 2, 288, 290, 9, 11, 2, 2, 289, 288, 3, 2, 2, 2, 290, 291, 3, 2, 2, 2, 291, 289, 3, 2, 2, 2, 291, 292, 3, 2, 2, 2, 292, 88, 3, 2, 2, 2, 293, 297, 7, 37, 2, 2, 294, 296, 10, 12, 2, 2, 295, 294, 3, 2, 2, 2, 296, 299, 3, 2, 2, 2, 297, 295, 3, 2, 2, 2, 297, 298, 3, 2, 2, 2, 298, 300, 3, 2, 2, 2, 299, 297, 3, 2, 2, 2, 300, 301, 8, 45, 2, 2, 301, 90, 3, 2, 2, 2, 302, 303, 11, 2, 2, 2, 303, 92, 3, 2, 2, 2, 20, 2, 109, 114, 118, 121, 125, 135, 140, 148, 162, 169, 178, 185, 190, 278, 285, 291, 297, 3, 8, 2, 2] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 63, 454, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 10, 6, 10, 155, 10, 10, 13, 10, 14, 10, 156, 3, 11, 3, 11, 3, 11, 5, 11, 162, 10, 11, 3, 11, 3, 11, 5, 11, 166, 10, 11, 3, 11, 5, 11, 169, 10, 11, 3, 12, 3, 12, 5, 12, 173, 10, 12, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 5, 16, 183, 10, 16, 3, 16, 3, 16, 3, 16, 5, 16, 188, 10, 16, 3, 16, 3, 16, 3, 17, 3, 17, 7, 17, 194, 10, 17, 12, 17, 14, 17, 197, 11, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 5, 18, 210, 10, 18, 3, 19, 3, 19, 3, 19, 7, 19, 215, 10, 19, 12, 19, 14, 19, 218, 11, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 5, 21, 226, 10, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 233, 10, 22, 3, 23, 6, 23, 236, 10, 23, 13, 23, 14, 23, 237, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, 3, 52, 3, 52, 3, 53, 3, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 7, 62, 427, 10, 62, 12, 62, 14, 62, 430, 11, 62, 3, 63, 3, 63, 7, 63, 434, 10, 63, 12, 63, 14, 63, 437, 11, 63, 3, 64, 6, 64, 440, 10, 64, 13, 64, 14, 64, 441, 3, 65, 3, 65, 7, 65, 446, 10, 65, 12, 65, 14, 65, 449, 11, 65, 3, 65, 3, 65, 3, 66, 3, 66, 2, 2, 67, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 2, 21, 2, 23, 2, 25, 2, 27, 11, 29, 12, 31, 13, 33, 14, 35, 15, 37, 16, 39, 17, 41, 18, 43, 19, 45, 20, 47, 21, 49, 22, 51, 23, 53, 24, 55, 25, 57, 26, 59, 27, 61, 28, 63, 29, 65, 30, 67, 31, 69, 32, 71, 33, 73, 34, 75, 35, 77, 36, 79, 37, 81, 38, 83, 39, 85, 40, 87, 41, 89, 42, 91, 43, 93, 44, 95, 45, 97, 46, 99, 47, 101, 48, 103, 49, 105, 50, 107, 51, 109, 52, 111, 53, 113, 54, 115, 55, 117, 56, 119, 57, 121, 58, 123, 59, 125, 60, 127, 61, 129, 62, 131, 63, 3, 2, 12, 3, 2, 50, 59, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 76, 76, 108, 108, 5, 2, 12, 12, 15, 15, 36, 36, 4, 2, 12, 12, 15, 15, 4, 2, 11, 11, 34, 34, 4, 2, 67, 92, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 7, 2, 48, 48, 50, 59, 67, 92, 97, 97, 99, 124, 2, 466, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3,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3, 2, 2, 2, 3, 133, 3, 2, 2, 2, 5, 135, 3, 2, 2, 2, 7, 137, 3, 2, 2, 2, 9, 139, 3, 2, 2, 2, 11, 141, 3, 2, 2, 2, 13, 144, 3, 2, 2, 2, 15, 146, 3, 2, 2, 2, 17, 150, 3, 2, 2, 2, 19, 154, 3, 2, 2, 2, 21, 158, 3, 2, 2, 2, 23, 172, 3, 2, 2, 2, 25, 174, 3, 2, 2, 2, 27, 177, 3, 2, 2, 2, 29, 179, 3, 2, 2, 2, 31, 182, 3, 2, 2, 2, 33, 191, 3, 2, 2, 2, 35, 209, 3, 2, 2, 2, 37, 211, 3, 2, 2, 2, 39, 219, 3, 2, 2, 2, 41, 225, 3, 2, 2, 2, 43, 232, 3, 2, 2, 2, 45, 235, 3, 2, 2, 2, 47, 241, 3, 2, 2, 2, 49, 246, 3, 2, 2, 2, 51, 254, 3, 2, 2, 2, 53, 261, 3, 2, 2, 2, 55, 266, 3, 2, 2, 2, 57, 274, 3, 2, 2, 2, 59, 279, 3, 2, 2, 2, 61, 283, 3, 2, 2, 2, 63, 287, 3, 2, 2, 2, 65, 291, 3, 2, 2, 2, 67, 298, 3, 2, 2, 2, 69, 305, 3, 2, 2, 2, 71, 312, 3, 2, 2, 2, 73, 317, 3, 2, 2, 2, 75, 322, 3, 2, 2, 2, 77, 327, 3, 2, 2, 2, 79, 335, 3, 2, 2, 2, 81, 343, 3, 2, 2, 2, 83, 351, 3, 2, 2, 2, 85, 355, 3, 2, 2, 2, 87, 359, 3, 2, 2, 2, 89, 361, 3, 2, 2, 2, 91, 363, 3, 2, 2, 2, 93, 365, 3, 2, 2, 2, 95, 367, 3, 2, 2, 2, 97, 369, 3, 2, 2, 2, 99, 371, 3, 2, 2, 2, 101, 373, 3, 2, 2, 2, 103, 375, 3, 2, 2, 2, 105, 377, 3, 2, 2, 2, 107, 379, 3, 2, 2, 2, 109, 381, 3, 2, 2, 2, 111, 387, 3, 2, 2, 2, 113, 393, 3, 2, 2, 2, 115, 401, 3, 2, 2, 2, 117, 405, 3, 2, 2, 2, 119, 409, 3, 2, 2, 2, 121, 414, 3, 2, 2, 2, 123, 417, 3, 2, 2, 2, 125, 431, 3, 2, 2, 2, 127, 439, 3, 2, 2, 2, 129, 443, 3, 2, 2, 2, 131, 452, 3, 2, 2, 2, 133, 134, 7, 45, 2, 2, 134, 4, 3, 2, 2, 2, 135, 136, 7, 47, 2, 2, 136, 6, 3, 2, 2, 2, 137, 138, 7, 44, 2, 2, 138, 8, 3, 2, 2, 2, 139, 140, 7, 49, 2, 2, 140, 10, 3, 2, 2, 2, 141, 142, 7, 44, 2, 2, 142, 143, 7, 44, 2, 2, 143, 12, 3, 2, 2, 2, 144, 145, 7, 63, 2, 2, 145, 14, 3, 2, 2, 2, 146, 147, 7, 104, 2, 2, 147, 148, 7, 113, 2, 2, 148, 149, 7, 116, 2, 2, 149, 16, 3, 2, 2, 2, 150, 151, 7, 107, 2, 2, 151, 152, 7, 112, 2, 2, 152, 18, 3, 2, 2, 2, 153, 155, 9, 2, 2, 2, 154, 153, 3, 2, 2, 2, 155, 156, 3, 2, 2, 2, 156, 154, 3, 2, 2, 2, 156, 157, 3, 2, 2, 2, 157, 20, 3, 2, 2, 2, 158, 161, 5, 19, 10, 2, 159, 160, 7, 48, 2, 2, 160, 162, 5, 19, 10, 2, 161, 159, 3, 2, 2, 2, 161, 162, 3, 2, 2, 2, 162, 168, 3, 2, 2, 2, 163, 165, 9, 3, 2, 2, 164, 166, 9, 4, 2, 2, 165, 164, 3, 2, 2, 2, 165, 166, 3, 2, 2, 2, 166, 167, 3, 2, 2, 2, 167, 169, 5, 19, 10, 2, 168, 163, 3, 2, 2, 2, 168, 169, 3, 2, 2, 2, 169, 22, 3, 2, 2, 2, 170, 173, 5, 21, 11, 2, 171, 173, 5, 19, 10, 2, 172, 170, 3, 2, 2, 2, 172, 171, 3, 2, 2, 2, 173, 24, 3, 2, 2, 2, 174, 175, 5, 23, 12, 2, 175, 176, 9, 5, 2, 2, 176, 26, 3, 2, 2, 2, 177, 178, 5, 19, 10, 2, 178, 28, 3, 2, 2, 2, 179, 180, 5, 21, 11, 2, 180, 30, 3, 2, 2, 2, 181, 183, 9, 4, 2, 2, 182, 181, 3, 2, 2, 2, 182, 183, 3, 2, 2, 2, 183, 187, 3, 2, 2, 2, 184, 185, 5, 23, 12, 2, 185, 186, 9, 4, 2, 2, 186, 188, 3, 2, 2, 2, 187, 184, 3, 2, 2, 2, 187, 188, 3, 2, 2, 2, 188, 189, 3, 2, 2, 2, 189, 190, 5, 25, 13, 2, 190, 32, 3, 2, 2, 2, 191, 195, 7, 36, 2, 2, 192, 194, 10, 6, 2, 2, 193, 192, 3, 2, 2, 2, 194, 197, 3, 2, 2, 2, 195, 193, 3, 2, 2, 2, 195, 196, 3, 2, 2, 2, 196, 198, 3, 2, 2, 2, 197, 195, 3, 2, 2, 2, 198, 199, 7, 36, 2, 2, 199, 34, 3, 2, 2, 2, 200, 201, 7, 86, 2, 2, 201, 202, 7, 116, 2, 2, 202, 203, 7, 119, 2, 2, 203, 210, 7, 103, 2, 2, 204, 205, 7, 72, 2, 2, 205, 206, 7, 99, 2, 2, 206, 207, 7, 110, 2, 2, 207, 208, 7, 117, 2, 2, 208, 210, 7, 103, 2, 2, 209, 200, 3, 2, 2, 2, 209, 204, 3, 2, 2, 2, 210, 36, 3, 2, 2, 2, 211, 216, 5, 23, 12, 2, 212, 213, 7, 46, 2, 2, 213, 215, 5, 23, 12, 2, 214, 212, 3, 2, 2, 2, 215, 218, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 216, 217, 3, 2, 2, 2, 217, 38, 3, 2, 2, 2, 218, 216, 3, 2, 2, 2, 219, 220, 7, 114, 2, 2, 220, 221, 7, 107, 2, 2, 221, 40, 3, 2, 2, 2, 222, 223, 7, 15, 2, 2, 223, 226, 7, 12, 2, 2, 224, 226, 9, 7, 2, 2, 225, 222, 3, 2, 2, 2, 225, 224, 3, 2, 2, 2, 226, 42, 3, 2, 2, 2, 227, 233, 7, 11, 2, 2, 228, 229, 7, 34, 2, 2, 229, 230, 7, 34, 2, 2, 230, 231, 7, 34, 2, 2, 231, 233, 7, 34, 2, 2, 232, 227, 3, 2, 2, 2, 232, 228, 3, 2, 2, 2, 233, 44, 3, 2, 2, 2, 234, 236, 9, 8, 2, 2, 235, 234, 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 235, 3, 2, 2, 2, 237, 238, 3, 2, 2, 2, 238, 239, 3, 2, 2, 2, 239, 240, 8, 23, 2, 2, 240, 46, 3, 2, 2, 2, 241, 242, 7, 112, 2, 2, 242, 243, 7, 99, 2, 2, 243, 244, 7, 111, 2, 2, 244, 245, 7, 103, 2, 2, 245, 48, 3, 2, 2, 2, 246, 247, 7, 120, 2, 2, 247, 248, 7, 103, 2, 2, 248, 249, 7, 116, 2, 2, 249, 250, 7, 117, 2, 2, 250, 251, 7, 107, 2, 2, 251, 252, 7, 113, 2, 2, 252, 253, 7, 112, 2, 2, 253, 50, 3, 2, 2, 2, 254, 255, 7, 118, 2, 2, 255, 256, 7, 99, 2, 2, 256, 257, 7, 116, 2, 2, 257, 258, 7, 105, 2, 2, 258, 259, 7, 103, 2, 2, 259, 260, 7, 118, 2, 2, 260, 52, 3, 2, 2, 2, 261, 262, 7, 118, 2, 2, 262, 263, 7, 123, 2, 2, 263, 264, 7, 114, 2, 2, 264, 265, 7, 103, 2, 2, 265, 54, 3, 2, 2, 2, 266, 267, 7, 107, 2, 2, 267, 268, 7, 112, 2, 2, 268, 269, 7, 101, 2, 2, 269, 270, 7, 110, 2, 2, 270, 271, 7, 119, 2, 2, 271, 272, 7, 102, 2, 2, 272, 273, 7, 103, 2, 2, 273, 56, 3, 2, 2, 2, 274, 275, 7, 117, 2, 2, 275, 276, 7, 115, 2, 2, 276, 277, 7, 116, 2, 2, 277, 278, 7, 118, 2, 2, 278, 58, 3, 2, 2, 2, 279, 280, 7, 117, 2, 2, 280, 281, 7, 107, 2, 2, 281, 282, 7, 112, 2, 2, 282, 60, 3, 2, 2, 2, 283, 284, 7, 101, 2, 2, 284, 285, 7, 113, 2, 2, 285, 286, 7, 117, 2, 2, 286, 62, 3, 2, 2, 2, 287, 288, 7, 118, 2, 2, 288, 289, 7, 99, 2, 2, 289, 290, 7, 112, 2, 2, 290, 64, 3, 2, 2, 2, 291, 292, 7, 99, 2, 2, 292, 293, 7, 116, 2, 2, 293, 294, 7, 101, 2, 2, 294, 295, 7, 117, 2, 2, 295, 296, 7, 107, 2, 2, 296, 297, 7, 112, 2, 2, 297, 66, 3, 2, 2, 2, 298, 299, 7, 99, 2, 2, 299, 300, 7, 116, 2, 2, 300, 301, 7, 101, 2, 2, 301, 302, 7, 101, 2, 2, 302, 303, 7, 113, 2, 2, 303, 304, 7, 117, 2, 2, 304, 68, 3, 2, 2, 2, 305, 306, 7, 99, 2, 2, 306, 307, 7, 116, 2, 2, 307, 308, 7, 101, 2, 2, 308, 309, 7, 118, 2, 2, 309, 310, 7, 99, 2, 2, 310, 311, 7, 112, 2, 2, 311, 70, 3, 2, 2, 2, 312, 313, 7, 117, 2, 2, 313, 314, 7, 107, 2, 2, 314, 315, 7, 112, 2, 2, 315, 316, 7, 106, 2, 2, 316, 72, 3, 2, 2, 2, 317, 318, 7, 101, 2, 2, 318, 319, 7, 113, 2, 2, 319, 320, 7, 117, 2, 2, 320, 321, 7, 106, 2, 2, 321, 74, 3, 2, 2, 2, 322, 323, 7, 118, 2, 2, 323, 324, 7, 99, 2, 2, 324, 325, 7, 112, 2, 2, 325, 326, 7, 106, 2, 2, 326, 76, 3, 2, 2, 2, 327, 328, 7, 99, 2, 2, 328, 329, 7, 116, 2, 2, 329, 330, 7, 101, 2, 2, 330, 331, 7, 117, 2, 2, 331, 332, 7, 107, 2, 2, 332, 333, 7, 112, 2, 2, 333, 334, 7, 106, 2, 2, 334, 78, 3, 2, 2, 2, 335, 336, 7, 99, 2, 2, 336, 337, 7, 116, 2, 2, 337, 338, 7, 101, 2, 2, 338, 339, 7, 101, 2, 2, 339, 340, 7, 113, 2, 2, 340, 341, 7, 117, 2, 2, 341, 342, 7, 106, 2, 2, 342, 80, 3, 2, 2, 2, 343, 344, 7, 99, 2, 2, 344, 345, 7, 116, 2, 2, 345, 346, 7, 101, 2, 2, 346, 347, 7, 118, 2, 2, 347, 348, 7, 99, 2, 2, 348, 349, 7, 112, 2, 2, 349, 350, 7, 106, 2, 2, 350, 82, 3, 2, 2, 2, 351, 352, 7, 103, 2, 2, 352, 353, 7, 122, 2, 2, 353, 354, 7, 114, 2, 2, 354, 84, 3, 2, 2, 2, 355, 356, 7, 110, 2, 2, 356, 357, 7, 113, 2, 2, 357, 358, 7, 105, 2, 2, 358, 86, 3, 2, 2, 2, 359, 360, 7, 48, 2, 2, 360, 88, 3, 2, 2, 2, 361, 362, 7, 46, 2, 2, 362, 90, 3, 2, 2, 2, 363, 364, 7, 60, 2, 2, 364, 92, 3, 2, 2, 2, 365, 366, 7, 36, 2, 2, 366, 94, 3, 2, 2, 2, 367, 368, 7, 42, 2, 2, 368, 96, 3, 2, 2, 2, 369, 370, 7, 43, 2, 2, 370, 98, 3, 2, 2, 2, 371, 372, 7, 93, 2, 2, 372, 100, 3, 2, 2, 2, 373, 374, 7, 95, 2, 2, 374, 102, 3, 2, 2, 2, 375, 376, 7, 125, 2, 2, 376, 104, 3, 2, 2, 2, 377, 378, 7, 127, 2, 2, 378, 106, 3, 2, 2, 2, 379, 380, 7, 126, 2, 2, 380, 108, 3, 2, 2, 2, 381, 382, 7, 99, 2, 2, 382, 383, 7, 116, 2, 2, 383, 384, 7, 116, 2, 2, 384, 385, 7, 99, 2, 2, 385, 386, 7, 123, 2, 2, 386, 110, 3, 2, 2, 2, 387, 388, 7, 104, 2, 2, 388, 389, 7, 110, 2, 2, 389, 390, 7, 113, 2, 2, 390, 391, 7, 99, 2, 2, 391, 392, 7, 118, 2, 2, 392, 112, 3, 2, 2, 2, 393, 394, 7, 101, 2, 2, 394, 395, 7, 113, 2, 2, 395, 396, 7, 111, 2, 2, 396, 397, 7, 114, 2, 2, 397, 398, 7, 110, 2, 2, 398, 399, 7, 103, 2, 2, 399, 400, 7, 122, 2, 2, 400, 114, 3, 2, 2, 2, 401, 402, 7, 107, 2, 2, 402, 403, 7, 112, 2, 2, 403, 404, 7, 118, 2, 2, 404, 116, 3, 2, 2, 2, 405, 406, 7, 117, 2, 2, 406, 407, 7, 118, 2, 2, 407, 408, 7, 116, 2, 2, 408, 118, 3, 2, 2, 2, 409, 410, 7, 100, 2, 2, 410, 411, 7, 113, 2, 2, 411, 412, 7, 113, 2, 2, 412, 413, 7, 110, 2, 2, 413, 120, 3, 2, 2, 2, 414, 415, 7, 115, 2, 2, 415, 416, 5, 19, 10, 2, 416, 122, 3, 2, 2, 2, 417, 418, 7, 79, 2, 2, 418, 419, 7, 103, 2, 2, 419, 420, 7, 99, 2, 2, 420, 421, 7, 117, 2, 2, 421, 422, 7, 119, 2, 2, 422, 423, 7, 116, 2, 2, 423, 424, 7, 103, 2, 2, 424, 428, 3, 2, 2, 2, 425, 427, 9, 9, 2, 2, 426, 425, 3, 2, 2, 2, 427, 430, 3, 2, 2, 2, 428, 426, 3, 2, 2, 2, 428, 429, 3, 2, 2, 2, 429, 124, 3, 2, 2, 2, 430, 428, 3, 2, 2, 2, 431, 435, 9, 9, 2, 2, 432, 434, 9, 10, 2, 2, 433, 432, 3, 2, 2, 2, 434, 437, 3, 2, 2, 2, 435, 433, 3, 2, 2, 2, 435, 436, 3, 2, 2, 2, 436, 126, 3, 2, 2, 2, 437, 435, 3, 2, 2, 2, 438, 440, 9, 11, 2, 2, 439, 438, 3, 2, 2, 2, 440, 441, 3, 2, 2, 2, 441, 439, 3, 2, 2, 2, 441, 442, 3, 2, 2, 2, 442, 128, 3, 2, 2, 2, 443, 447, 7, 37, 2, 2, 444, 446, 10, 7, 2, 2, 445, 444, 3, 2, 2, 2, 446, 449, 3, 2, 2, 2, 447, 445, 3, 2, 2, 2, 447, 448, 3, 2, 2, 2, 448, 450, 3, 2, 2, 2, 449, 447, 3, 2, 2, 2, 450, 451, 8, 65, 2, 2, 451, 130, 3, 2, 2, 2, 452, 453, 11, 2, 2, 2, 453, 132, 3, 2, 2, 2, 20, 2, 156, 161, 165, 168, 172, 182, 187, 195, 209, 216, 225, 232, 237, 428, 435, 441, 447, 3, 8, 2, 2] \ No newline at end of file diff --git a/blackbird_cpp/blackbirdLexer.tokens b/blackbird_cpp/blackbirdLexer.tokens index c651ff8..b3fbc3f 100644 --- a/blackbird_cpp/blackbirdLexer.tokens +++ b/blackbird_cpp/blackbirdLexer.tokens @@ -4,65 +4,104 @@ TIMES=3 DIVIDE=4 PWR=5 ASSIGN=6 -INT=7 -FLOAT=8 -COMPLEX=9 -STR=10 -BOOL=11 -SEQUENCE=12 -PI=13 -NEWLINE=14 -TAB=15 -SPACE=16 -WITH=17 -SQRT=18 -SIN=19 -COS=20 -EXP=21 -PERIOD=22 -COMMA=23 -COLON=24 -QUOTE=25 -LBRAC=26 -RBRAC=27 -LSQBRAC=28 -RSQBRAC=29 -APPLY=30 -TYPE_ARRAY=31 -TYPE_FLOAT=32 -TYPE_COMPLEX=33 -TYPE_INT=34 -TYPE_STR=35 -TYPE_BOOL=36 -MEASURE=37 -NAME=38 -DEVICE=39 -COMMENT=40 -ANY=41 +FOR=7 +IN=8 +INT=9 +FLOAT=10 +COMPLEX=11 +STR=12 +BOOL=13 +SEQUENCE=14 +PI=15 +NEWLINE=16 +TAB=17 +SPACE=18 +PROGNAME=19 +VERSION=20 +TARGET=21 +PROGTYPE=22 +INCLUDE=23 +SQRT=24 +SIN=25 +COS=26 +TAN=27 +ARCSIN=28 +ARCCOS=29 +ARCTAN=30 +SINH=31 +COSH=32 +TANH=33 +ARCSINH=34 +ARCCOSH=35 +ARCTANH=36 +EXP=37 +LOG=38 +PERIOD=39 +COMMA=40 +COLON=41 +QUOTE=42 +LBRAC=43 +RBRAC=44 +LSQBRAC=45 +RSQBRAC=46 +LBRACE=47 +RBRACE=48 +APPLY=49 +TYPE_ARRAY=50 +TYPE_FLOAT=51 +TYPE_COMPLEX=52 +TYPE_INT=53 +TYPE_STR=54 +TYPE_BOOL=55 +REGREF=56 +MEASURE=57 +NAME=58 +DEVICE=59 +COMMENT=60 +ANY=61 '+'=1 '-'=2 '*'=3 '/'=4 '**'=5 '='=6 -'pi'=13 -'with'=17 -'sqrt'=18 -'sin'=19 -'cos'=20 -'exp'=21 -'.'=22 -','=23 -':'=24 -'"'=25 -'('=26 -')'=27 -'['=28 -']'=29 -'|'=30 -'array'=31 -'float'=32 -'complex'=33 -'int'=34 -'str'=35 -'bool'=36 +'for'=7 +'in'=8 +'pi'=15 +'name'=19 +'version'=20 +'target'=21 +'type'=22 +'include'=23 +'sqrt'=24 +'sin'=25 +'cos'=26 +'tan'=27 +'arcsin'=28 +'arccos'=29 +'arctan'=30 +'sinh'=31 +'cosh'=32 +'tanh'=33 +'arcsinh'=34 +'arccosh'=35 +'arctanh'=36 +'exp'=37 +'log'=38 +'.'=39 +','=40 +':'=41 +'"'=42 +'('=43 +')'=44 +'['=45 +']'=46 +'{'=47 +'}'=48 +'|'=49 +'array'=50 +'float'=51 +'complex'=52 +'int'=53 +'str'=54 +'bool'=55 diff --git a/blackbird_cpp/blackbirdParser.cpp b/blackbird_cpp/blackbirdParser.cpp index a106121..35033b1 100644 --- a/blackbird_cpp/blackbirdParser.cpp +++ b/blackbird_cpp/blackbirdParser.cpp @@ -1,5 +1,5 @@ -// Generated from blackbird.g4 by ANTLR 4.7.1 +// Generated from blackbird.g4 by ANTLR 4.9.2 #include "blackbirdVisitor.h" @@ -37,8 +37,8 @@ blackbirdParser::StartContext::StartContext(ParserRuleContext *parent, size_t in : ParserRuleContext(parent, invokingState) { } -blackbirdParser::VarblockContext* blackbirdParser::StartContext::varblock() { - return getRuleContext(0); +blackbirdParser::MetadatablockContext* blackbirdParser::StartContext::metadatablock() { + return getRuleContext(0); } blackbirdParser::ProgramContext* blackbirdParser::StartContext::program() { @@ -62,39 +62,744 @@ size_t blackbirdParser::StartContext::getRuleIndex() const { return blackbirdParser::RuleStart; } + antlrcpp::Any blackbirdParser::StartContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitStart(this); + return parserVisitor->visitStart(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::StartContext* blackbirdParser::start() { + StartContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 0, blackbirdParser::RuleStart); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + size_t alt; + enterOuterAlt(_localctx, 1); + setState(73); + _errHandler->sync(this); + _la = _input->LA(1); + while (_la == blackbirdParser::NEWLINE) { + setState(70); + match(blackbirdParser::NEWLINE); + setState(75); + _errHandler->sync(this); + _la = _input->LA(1); + } + setState(76); + metadatablock(); + setState(80); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 1, _ctx); + while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { + if (alt == 1) { + setState(77); + match(blackbirdParser::NEWLINE); + } + setState(82); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 1, _ctx); + } + setState(83); + program(); + setState(87); + _errHandler->sync(this); + _la = _input->LA(1); + while (_la == blackbirdParser::NEWLINE) { + setState(84); + match(blackbirdParser::NEWLINE); + setState(89); + _errHandler->sync(this); + _la = _input->LA(1); + } + setState(90); + match(blackbirdParser::EOF); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- MetadatablockContext ------------------------------------------------------------------ + +blackbirdParser::MetadatablockContext::MetadatablockContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +blackbirdParser::DeclarenameContext* blackbirdParser::MetadatablockContext::declarename() { + return getRuleContext(0); +} + +blackbirdParser::VersionContext* blackbirdParser::MetadatablockContext::version() { + return getRuleContext(0); +} + +std::vector blackbirdParser::MetadatablockContext::NEWLINE() { + return getTokens(blackbirdParser::NEWLINE); +} + +tree::TerminalNode* blackbirdParser::MetadatablockContext::NEWLINE(size_t i) { + return getToken(blackbirdParser::NEWLINE, i); +} + +blackbirdParser::TargetContext* blackbirdParser::MetadatablockContext::target() { + return getRuleContext(0); +} + +blackbirdParser::DeclaretypeContext* blackbirdParser::MetadatablockContext::declaretype() { + return getRuleContext(0); +} + +std::vector blackbirdParser::MetadatablockContext::include() { + return getRuleContexts(); +} + +blackbirdParser::IncludeContext* blackbirdParser::MetadatablockContext::include(size_t i) { + return getRuleContext(i); +} + + +size_t blackbirdParser::MetadatablockContext::getRuleIndex() const { + return blackbirdParser::RuleMetadatablock; +} + + +antlrcpp::Any blackbirdParser::MetadatablockContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitMetadatablock(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::MetadatablockContext* blackbirdParser::metadatablock() { + MetadatablockContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 2, blackbirdParser::RuleMetadatablock); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + size_t alt; + enterOuterAlt(_localctx, 1); + setState(92); + declarename(); + setState(94); + _errHandler->sync(this); + _la = _input->LA(1); + do { + setState(93); + match(blackbirdParser::NEWLINE); + setState(96); + _errHandler->sync(this); + _la = _input->LA(1); + } while (_la == blackbirdParser::NEWLINE); + setState(98); + version(); + setState(105); + _errHandler->sync(this); + + switch (getInterpreter()->adaptivePredict(_input, 5, _ctx)) { + case 1: { + setState(100); + _errHandler->sync(this); + _la = _input->LA(1); + do { + setState(99); + match(blackbirdParser::NEWLINE); + setState(102); + _errHandler->sync(this); + _la = _input->LA(1); + } while (_la == blackbirdParser::NEWLINE); + setState(104); + target(); + break; + } + + default: + break; + } + setState(113); + _errHandler->sync(this); + + switch (getInterpreter()->adaptivePredict(_input, 7, _ctx)) { + case 1: { + setState(108); + _errHandler->sync(this); + _la = _input->LA(1); + do { + setState(107); + match(blackbirdParser::NEWLINE); + setState(110); + _errHandler->sync(this); + _la = _input->LA(1); + } while (_la == blackbirdParser::NEWLINE); + setState(112); + declaretype(); + break; + } + + default: + break; + } + setState(119); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 9, _ctx); + while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { + if (alt == 1) { + setState(117); + _errHandler->sync(this); + switch (_input->LA(1)) { + case blackbirdParser::NEWLINE: { + setState(115); + match(blackbirdParser::NEWLINE); + break; + } + + case blackbirdParser::INCLUDE: { + setState(116); + dynamic_cast(_localctx)->includeContext = include(); + dynamic_cast(_localctx)->include_list.push_back(dynamic_cast(_localctx)->includeContext); + break; + } + + default: + throw NoViableAltException(this); + } + } + setState(121); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 9, _ctx); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- DeclarenameContext ------------------------------------------------------------------ + +blackbirdParser::DeclarenameContext::DeclarenameContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::DeclarenameContext::PROGNAME() { + return getToken(blackbirdParser::PROGNAME, 0); +} + +blackbirdParser::ProgramnameContext* blackbirdParser::DeclarenameContext::programname() { + return getRuleContext(0); +} + + +size_t blackbirdParser::DeclarenameContext::getRuleIndex() const { + return blackbirdParser::RuleDeclarename; +} + + +antlrcpp::Any blackbirdParser::DeclarenameContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitDeclarename(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::DeclarenameContext* blackbirdParser::declarename() { + DeclarenameContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 4, blackbirdParser::RuleDeclarename); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(122); + match(blackbirdParser::PROGNAME); + setState(123); + programname(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- ProgramnameContext ------------------------------------------------------------------ + +blackbirdParser::ProgramnameContext::ProgramnameContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::ProgramnameContext::NAME() { + return getToken(blackbirdParser::NAME, 0); +} + + +size_t blackbirdParser::ProgramnameContext::getRuleIndex() const { + return blackbirdParser::RuleProgramname; +} + + +antlrcpp::Any blackbirdParser::ProgramnameContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitProgramname(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::ProgramnameContext* blackbirdParser::programname() { + ProgramnameContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 6, blackbirdParser::RuleProgramname); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(125); + match(blackbirdParser::NAME); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- VersionContext ------------------------------------------------------------------ + +blackbirdParser::VersionContext::VersionContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::VersionContext::VERSION() { + return getToken(blackbirdParser::VERSION, 0); +} + +blackbirdParser::VersionnumberContext* blackbirdParser::VersionContext::versionnumber() { + return getRuleContext(0); +} + + +size_t blackbirdParser::VersionContext::getRuleIndex() const { + return blackbirdParser::RuleVersion; +} + + +antlrcpp::Any blackbirdParser::VersionContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitVersion(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::VersionContext* blackbirdParser::version() { + VersionContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 8, blackbirdParser::RuleVersion); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(127); + match(blackbirdParser::VERSION); + setState(128); + versionnumber(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- VersionnumberContext ------------------------------------------------------------------ + +blackbirdParser::VersionnumberContext::VersionnumberContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::VersionnumberContext::FLOAT() { + return getToken(blackbirdParser::FLOAT, 0); +} + + +size_t blackbirdParser::VersionnumberContext::getRuleIndex() const { + return blackbirdParser::RuleVersionnumber; +} + + +antlrcpp::Any blackbirdParser::VersionnumberContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitVersionnumber(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::VersionnumberContext* blackbirdParser::versionnumber() { + VersionnumberContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 10, blackbirdParser::RuleVersionnumber); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(130); + match(blackbirdParser::FLOAT); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- TargetContext ------------------------------------------------------------------ + +blackbirdParser::TargetContext::TargetContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::TargetContext::TARGET() { + return getToken(blackbirdParser::TARGET, 0); +} + +blackbirdParser::DeviceContext* blackbirdParser::TargetContext::device() { + return getRuleContext(0); +} + +blackbirdParser::ArgumentsContext* blackbirdParser::TargetContext::arguments() { + return getRuleContext(0); +} + + +size_t blackbirdParser::TargetContext::getRuleIndex() const { + return blackbirdParser::RuleTarget; +} + + +antlrcpp::Any blackbirdParser::TargetContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitTarget(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::TargetContext* blackbirdParser::target() { + TargetContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 12, blackbirdParser::RuleTarget); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(132); + match(blackbirdParser::TARGET); + setState(133); + device(); + setState(135); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == blackbirdParser::LBRAC) { + setState(134); + arguments(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- DeviceContext ------------------------------------------------------------------ + +blackbirdParser::DeviceContext::DeviceContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::DeviceContext::NAME() { + return getToken(blackbirdParser::NAME, 0); +} + +tree::TerminalNode* blackbirdParser::DeviceContext::DEVICE() { + return getToken(blackbirdParser::DEVICE, 0); +} + + +size_t blackbirdParser::DeviceContext::getRuleIndex() const { + return blackbirdParser::RuleDevice; +} + + +antlrcpp::Any blackbirdParser::DeviceContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitDevice(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::DeviceContext* blackbirdParser::device() { + DeviceContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 14, blackbirdParser::RuleDevice); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(137); + _la = _input->LA(1); + if (!(_la == blackbirdParser::NAME + + || _la == blackbirdParser::DEVICE)) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- DeclaretypeContext ------------------------------------------------------------------ + +blackbirdParser::DeclaretypeContext::DeclaretypeContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::DeclaretypeContext::PROGTYPE() { + return getToken(blackbirdParser::PROGTYPE, 0); +} + +blackbirdParser::ProgramtypeContext* blackbirdParser::DeclaretypeContext::programtype() { + return getRuleContext(0); +} + +blackbirdParser::ArgumentsContext* blackbirdParser::DeclaretypeContext::arguments() { + return getRuleContext(0); +} + + +size_t blackbirdParser::DeclaretypeContext::getRuleIndex() const { + return blackbirdParser::RuleDeclaretype; +} + + +antlrcpp::Any blackbirdParser::DeclaretypeContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitDeclaretype(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::DeclaretypeContext* blackbirdParser::declaretype() { + DeclaretypeContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 16, blackbirdParser::RuleDeclaretype); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(139); + match(blackbirdParser::PROGTYPE); + setState(140); + programtype(); + setState(142); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == blackbirdParser::LBRAC) { + setState(141); + arguments(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- ProgramtypeContext ------------------------------------------------------------------ + +blackbirdParser::ProgramtypeContext::ProgramtypeContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::ProgramtypeContext::NAME() { + return getToken(blackbirdParser::NAME, 0); +} + + +size_t blackbirdParser::ProgramtypeContext::getRuleIndex() const { + return blackbirdParser::RuleProgramtype; +} + + +antlrcpp::Any blackbirdParser::ProgramtypeContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitProgramtype(this); else return visitor->visitChildren(this); } -blackbirdParser::StartContext* blackbirdParser::start() { - StartContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 0, blackbirdParser::RuleStart); - size_t _la = 0; +blackbirdParser::ProgramtypeContext* blackbirdParser::programtype() { + ProgramtypeContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 18, blackbirdParser::RuleProgramtype); +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(44); - varblock(); - setState(45); - program(); - setState(49); - _errHandler->sync(this); - _la = _input->LA(1); - while (_la == blackbirdParser::NEWLINE) { - setState(46); - match(blackbirdParser::NEWLINE); - setState(51); - _errHandler->sync(this); - _la = _input->LA(1); - } - setState(52); - match(blackbirdParser::EOF); + setState(144); + match(blackbirdParser::NAME); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- IncludeContext ------------------------------------------------------------------ + +blackbirdParser::IncludeContext::IncludeContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::IncludeContext::INCLUDE() { + return getToken(blackbirdParser::INCLUDE, 0); +} + +tree::TerminalNode* blackbirdParser::IncludeContext::STR() { + return getToken(blackbirdParser::STR, 0); +} + + +size_t blackbirdParser::IncludeContext::getRuleIndex() const { + return blackbirdParser::RuleInclude; +} + + +antlrcpp::Any blackbirdParser::IncludeContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitInclude(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::IncludeContext* blackbirdParser::include() { + IncludeContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 20, blackbirdParser::RuleInclude); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(146); + match(blackbirdParser::INCLUDE); + setState(147); + match(blackbirdParser::STR); } catch (RecognitionException &e) { @@ -106,96 +811,128 @@ blackbirdParser::StartContext* blackbirdParser::start() { return _localctx; } -//----------------- VarblockContext ------------------------------------------------------------------ +//----------------- ProgramContext ------------------------------------------------------------------ -blackbirdParser::VarblockContext::VarblockContext(ParserRuleContext *parent, size_t invokingState) +blackbirdParser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector blackbirdParser::VarblockContext::NEWLINE() { +std::vector blackbirdParser::ProgramContext::NEWLINE() { return getTokens(blackbirdParser::NEWLINE); } -tree::TerminalNode* blackbirdParser::VarblockContext::NEWLINE(size_t i) { +tree::TerminalNode* blackbirdParser::ProgramContext::NEWLINE(size_t i) { return getToken(blackbirdParser::NEWLINE, i); } -std::vector blackbirdParser::VarblockContext::expressionvar() { +std::vector blackbirdParser::ProgramContext::forloop() { + return getRuleContexts(); +} + +blackbirdParser::ForloopContext* blackbirdParser::ProgramContext::forloop(size_t i) { + return getRuleContext(i); +} + +std::vector blackbirdParser::ProgramContext::expressionvar() { return getRuleContexts(); } -blackbirdParser::ExpressionvarContext* blackbirdParser::VarblockContext::expressionvar(size_t i) { +blackbirdParser::ExpressionvarContext* blackbirdParser::ProgramContext::expressionvar(size_t i) { return getRuleContext(i); } -std::vector blackbirdParser::VarblockContext::arrayvar() { +std::vector blackbirdParser::ProgramContext::arrayvar() { return getRuleContexts(); } -blackbirdParser::ArrayvarContext* blackbirdParser::VarblockContext::arrayvar(size_t i) { +blackbirdParser::ArrayvarContext* blackbirdParser::ProgramContext::arrayvar(size_t i) { return getRuleContext(i); } +std::vector blackbirdParser::ProgramContext::statement() { + return getRuleContexts(); +} + +blackbirdParser::StatementContext* blackbirdParser::ProgramContext::statement(size_t i) { + return getRuleContext(i); +} + -size_t blackbirdParser::VarblockContext::getRuleIndex() const { - return blackbirdParser::RuleVarblock; +size_t blackbirdParser::ProgramContext::getRuleIndex() const { + return blackbirdParser::RuleProgram; } -antlrcpp::Any blackbirdParser::VarblockContext::accept(tree::ParseTreeVisitor *visitor) { + +antlrcpp::Any blackbirdParser::ProgramContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitVarblock(this); + return parserVisitor->visitProgram(this); else return visitor->visitChildren(this); } -blackbirdParser::VarblockContext* blackbirdParser::varblock() { - VarblockContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 2, blackbirdParser::RuleVarblock); - size_t _la = 0; +blackbirdParser::ProgramContext* blackbirdParser::program() { + ProgramContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 22, blackbirdParser::RuleProgram); +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { + size_t alt; enterOuterAlt(_localctx, 1); - setState(59); + setState(156); _errHandler->sync(this); - _la = _input->LA(1); - while ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & ((1ULL << blackbirdParser::NEWLINE) - | (1ULL << blackbirdParser::TYPE_ARRAY) - | (1ULL << blackbirdParser::TYPE_FLOAT) - | (1ULL << blackbirdParser::TYPE_COMPLEX) - | (1ULL << blackbirdParser::TYPE_INT) - | (1ULL << blackbirdParser::TYPE_STR) - | (1ULL << blackbirdParser::TYPE_BOOL))) != 0)) { - setState(57); - _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 1, _ctx)) { - case 1: { - setState(54); - match(blackbirdParser::NEWLINE); - break; - } + alt = getInterpreter()->adaptivePredict(_input, 13, _ctx); + while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { + if (alt == 1) { + setState(154); + _errHandler->sync(this); + switch (getInterpreter()->adaptivePredict(_input, 12, _ctx)) { + case 1: { + setState(149); + match(blackbirdParser::NEWLINE); + break; + } - case 2: { - setState(55); - dynamic_cast(_localctx)->expressionvarContext = expressionvar(); - dynamic_cast(_localctx)->var_list.push_back(dynamic_cast(_localctx)->expressionvarContext); - break; - } + case 2: { + setState(150); + dynamic_cast(_localctx)->forloopContext = forloop(); + dynamic_cast(_localctx)->for_list.push_back(dynamic_cast(_localctx)->forloopContext); + break; + } - case 3: { - setState(56); - dynamic_cast(_localctx)->arrayvarContext = arrayvar(); - dynamic_cast(_localctx)->array_list.push_back(dynamic_cast(_localctx)->arrayvarContext); - break; - } + case 3: { + setState(151); + dynamic_cast(_localctx)->expressionvarContext = expressionvar(); + dynamic_cast(_localctx)->var_list.push_back(dynamic_cast(_localctx)->expressionvarContext); + break; + } + + case 4: { + setState(152); + dynamic_cast(_localctx)->arrayvarContext = arrayvar(); + dynamic_cast(_localctx)->array_list.push_back(dynamic_cast(_localctx)->arrayvarContext); + break; + } + + case 5: { + setState(153); + dynamic_cast(_localctx)->statementContext = statement(); + dynamic_cast(_localctx)->statement_list.push_back(dynamic_cast(_localctx)->statementContext); + break; + } + default: + break; + } } - setState(61); + setState(158); _errHandler->sync(this); - _la = _input->LA(1); + alt = getInterpreter()->adaptivePredict(_input, 13, _ctx); } } @@ -239,6 +976,7 @@ size_t blackbirdParser::ExpressionvarContext::getRuleIndex() const { return blackbirdParser::RuleExpressionvar; } + antlrcpp::Any blackbirdParser::ExpressionvarContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitExpressionvar(this); @@ -248,20 +986,24 @@ antlrcpp::Any blackbirdParser::ExpressionvarContext::accept(tree::ParseTreeVisit blackbirdParser::ExpressionvarContext* blackbirdParser::expressionvar() { ExpressionvarContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 4, blackbirdParser::RuleExpressionvar); + enterRule(_localctx, 24, blackbirdParser::RuleExpressionvar); +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(62); + setState(159); vartype(); - setState(63); + setState(160); name(); - setState(64); + setState(161); match(blackbirdParser::ASSIGN); - setState(67); + setState(164); _errHandler->sync(this); switch (_input->LA(1)) { case blackbirdParser::PLUS: @@ -273,17 +1015,30 @@ blackbirdParser::ExpressionvarContext* blackbirdParser::expressionvar() { case blackbirdParser::SQRT: case blackbirdParser::SIN: case blackbirdParser::COS: + case blackbirdParser::TAN: + case blackbirdParser::ARCSIN: + case blackbirdParser::ARCCOS: + case blackbirdParser::ARCTAN: + case blackbirdParser::SINH: + case blackbirdParser::COSH: + case blackbirdParser::TANH: + case blackbirdParser::ARCSINH: + case blackbirdParser::ARCCOSH: + case blackbirdParser::ARCTANH: case blackbirdParser::EXP: + case blackbirdParser::LOG: case blackbirdParser::LBRAC: + case blackbirdParser::LBRACE: + case blackbirdParser::REGREF: case blackbirdParser::NAME: { - setState(65); + setState(162); expression(0); break; } case blackbirdParser::STR: case blackbirdParser::BOOL: { - setState(66); + setState(163); nonnumeric(); break; } @@ -320,76 +1075,257 @@ blackbirdParser::NameContext* blackbirdParser::ArrayvarContext::name() { return getRuleContext(0); } -tree::TerminalNode* blackbirdParser::ArrayvarContext::ASSIGN() { - return getToken(blackbirdParser::ASSIGN, 0); -} +tree::TerminalNode* blackbirdParser::ArrayvarContext::ASSIGN() { + return getToken(blackbirdParser::ASSIGN, 0); +} + +tree::TerminalNode* blackbirdParser::ArrayvarContext::NEWLINE() { + return getToken(blackbirdParser::NEWLINE, 0); +} + +blackbirdParser::ArrayvalContext* blackbirdParser::ArrayvarContext::arrayval() { + return getRuleContext(0); +} + +blackbirdParser::ParameterContext* blackbirdParser::ArrayvarContext::parameter() { + return getRuleContext(0); +} + +tree::TerminalNode* blackbirdParser::ArrayvarContext::LSQBRAC() { + return getToken(blackbirdParser::LSQBRAC, 0); +} + +blackbirdParser::ShapeContext* blackbirdParser::ArrayvarContext::shape() { + return getRuleContext(0); +} + +tree::TerminalNode* blackbirdParser::ArrayvarContext::RSQBRAC() { + return getToken(blackbirdParser::RSQBRAC, 0); +} + + +size_t blackbirdParser::ArrayvarContext::getRuleIndex() const { + return blackbirdParser::RuleArrayvar; +} + + +antlrcpp::Any blackbirdParser::ArrayvarContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitArrayvar(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::ArrayvarContext* blackbirdParser::arrayvar() { + ArrayvarContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 26, blackbirdParser::RuleArrayvar); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(166); + vartype(); + setState(167); + match(blackbirdParser::TYPE_ARRAY); + setState(168); + name(); + setState(173); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == blackbirdParser::LSQBRAC) { + setState(169); + match(blackbirdParser::LSQBRAC); + setState(170); + shape(); + setState(171); + match(blackbirdParser::RSQBRAC); + } + setState(175); + match(blackbirdParser::ASSIGN); + setState(176); + match(blackbirdParser::NEWLINE); + setState(179); + _errHandler->sync(this); + switch (_input->LA(1)) { + case blackbirdParser::EOF: + case blackbirdParser::FOR: + case blackbirdParser::NEWLINE: + case blackbirdParser::TAB: + case blackbirdParser::TYPE_ARRAY: + case blackbirdParser::TYPE_FLOAT: + case blackbirdParser::TYPE_COMPLEX: + case blackbirdParser::TYPE_INT: + case blackbirdParser::TYPE_STR: + case blackbirdParser::TYPE_BOOL: + case blackbirdParser::MEASURE: + case blackbirdParser::NAME: { + setState(177); + arrayval(); + break; + } + + case blackbirdParser::LBRACE: { + setState(178); + parameter(); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- NameContext ------------------------------------------------------------------ + +blackbirdParser::NameContext::NameContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +blackbirdParser::InvalidContext* blackbirdParser::NameContext::invalid() { + return getRuleContext(0); +} + +tree::TerminalNode* blackbirdParser::NameContext::NAME() { + return getToken(blackbirdParser::NAME, 0); +} + + +size_t blackbirdParser::NameContext::getRuleIndex() const { + return blackbirdParser::RuleName; +} + + +antlrcpp::Any blackbirdParser::NameContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitName(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::NameContext* blackbirdParser::name() { + NameContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 28, blackbirdParser::RuleName); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(183); + _errHandler->sync(this); + switch (_input->LA(1)) { + case blackbirdParser::PROGNAME: + case blackbirdParser::VERSION: + case blackbirdParser::TARGET: + case blackbirdParser::PROGTYPE: + case blackbirdParser::REGREF: { + setState(181); + invalid(); + break; + } + + case blackbirdParser::NAME: { + setState(182); + match(blackbirdParser::NAME); + break; + } -tree::TerminalNode* blackbirdParser::ArrayvarContext::NEWLINE() { - return getToken(blackbirdParser::NEWLINE, 0); -} + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } -blackbirdParser::ArrayvalContext* blackbirdParser::ArrayvarContext::arrayval() { - return getRuleContext(0); + return _localctx; } -tree::TerminalNode* blackbirdParser::ArrayvarContext::LSQBRAC() { - return getToken(blackbirdParser::LSQBRAC, 0); +//----------------- InvalidContext ------------------------------------------------------------------ + +blackbirdParser::InvalidContext::InvalidContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { } -blackbirdParser::ShapeContext* blackbirdParser::ArrayvarContext::shape() { - return getRuleContext(0); +tree::TerminalNode* blackbirdParser::InvalidContext::REGREF() { + return getToken(blackbirdParser::REGREF, 0); } -tree::TerminalNode* blackbirdParser::ArrayvarContext::RSQBRAC() { - return getToken(blackbirdParser::RSQBRAC, 0); +blackbirdParser::ReservedContext* blackbirdParser::InvalidContext::reserved() { + return getRuleContext(0); } -size_t blackbirdParser::ArrayvarContext::getRuleIndex() const { - return blackbirdParser::RuleArrayvar; +size_t blackbirdParser::InvalidContext::getRuleIndex() const { + return blackbirdParser::RuleInvalid; } -antlrcpp::Any blackbirdParser::ArrayvarContext::accept(tree::ParseTreeVisitor *visitor) { + +antlrcpp::Any blackbirdParser::InvalidContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitArrayvar(this); + return parserVisitor->visitInvalid(this); else return visitor->visitChildren(this); } -blackbirdParser::ArrayvarContext* blackbirdParser::arrayvar() { - ArrayvarContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 6, blackbirdParser::RuleArrayvar); - size_t _la = 0; +blackbirdParser::InvalidContext* blackbirdParser::invalid() { + InvalidContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 30, blackbirdParser::RuleInvalid); +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(69); - vartype(); - setState(70); - match(blackbirdParser::TYPE_ARRAY); - setState(71); - name(); - setState(76); + setState(187); _errHandler->sync(this); + switch (_input->LA(1)) { + case blackbirdParser::REGREF: { + setState(185); + match(blackbirdParser::REGREF); + break; + } - _la = _input->LA(1); - if (_la == blackbirdParser::LSQBRAC) { - setState(72); - match(blackbirdParser::LSQBRAC); - setState(73); - shape(); - setState(74); - match(blackbirdParser::RSQBRAC); + case blackbirdParser::PROGNAME: + case blackbirdParser::VERSION: + case blackbirdParser::TARGET: + case blackbirdParser::PROGTYPE: { + setState(186); + reserved(); + break; + } + + default: + throw NoViableAltException(this); } - setState(78); - match(blackbirdParser::ASSIGN); - setState(79); - match(blackbirdParser::NEWLINE); - setState(80); - arrayval(); } catch (RecognitionException &e) { @@ -401,39 +1337,68 @@ blackbirdParser::ArrayvarContext* blackbirdParser::arrayvar() { return _localctx; } -//----------------- NameContext ------------------------------------------------------------------ +//----------------- ReservedContext ------------------------------------------------------------------ -blackbirdParser::NameContext::NameContext(ParserRuleContext *parent, size_t invokingState) +blackbirdParser::ReservedContext::ReservedContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* blackbirdParser::NameContext::NAME() { - return getToken(blackbirdParser::NAME, 0); +tree::TerminalNode* blackbirdParser::ReservedContext::PROGNAME() { + return getToken(blackbirdParser::PROGNAME, 0); +} + +tree::TerminalNode* blackbirdParser::ReservedContext::VERSION() { + return getToken(blackbirdParser::VERSION, 0); } +tree::TerminalNode* blackbirdParser::ReservedContext::TARGET() { + return getToken(blackbirdParser::TARGET, 0); +} -size_t blackbirdParser::NameContext::getRuleIndex() const { - return blackbirdParser::RuleName; +tree::TerminalNode* blackbirdParser::ReservedContext::PROGTYPE() { + return getToken(blackbirdParser::PROGTYPE, 0); } -antlrcpp::Any blackbirdParser::NameContext::accept(tree::ParseTreeVisitor *visitor) { + +size_t blackbirdParser::ReservedContext::getRuleIndex() const { + return blackbirdParser::RuleReserved; +} + + +antlrcpp::Any blackbirdParser::ReservedContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitName(this); + return parserVisitor->visitReserved(this); else return visitor->visitChildren(this); } -blackbirdParser::NameContext* blackbirdParser::name() { - NameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 8, blackbirdParser::RuleName); +blackbirdParser::ReservedContext* blackbirdParser::reserved() { + ReservedContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 32, blackbirdParser::RuleReserved); + size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(82); - match(blackbirdParser::NAME); + setState(189); + _la = _input->LA(1); + if (!((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & ((1ULL << blackbirdParser::PROGNAME) + | (1ULL << blackbirdParser::VERSION) + | (1ULL << blackbirdParser::TARGET) + | (1ULL << blackbirdParser::PROGTYPE))) != 0))) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } } catch (RecognitionException &e) { @@ -480,6 +1445,7 @@ size_t blackbirdParser::VartypeContext::getRuleIndex() const { return blackbirdParser::RuleVartype; } + antlrcpp::Any blackbirdParser::VartypeContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitVartype(this); @@ -489,15 +1455,19 @@ antlrcpp::Any blackbirdParser::VartypeContext::accept(tree::ParseTreeVisitor *vi blackbirdParser::VartypeContext* blackbirdParser::vartype() { VartypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 10, blackbirdParser::RuleVartype); + enterRule(_localctx, 34, blackbirdParser::RuleVartype); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(84); + setState(191); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & ((1ULL << blackbirdParser::TYPE_ARRAY) @@ -542,6 +1512,7 @@ size_t blackbirdParser::NonnumericContext::getRuleIndex() const { return blackbirdParser::RuleNonnumeric; } + antlrcpp::Any blackbirdParser::NonnumericContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitNonnumeric(this); @@ -551,15 +1522,19 @@ antlrcpp::Any blackbirdParser::NonnumericContext::accept(tree::ParseTreeVisitor blackbirdParser::NonnumericContext* blackbirdParser::nonnumeric() { NonnumericContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 12, blackbirdParser::RuleNonnumeric); + enterRule(_localctx, 36, blackbirdParser::RuleNonnumeric); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(86); + setState(193); _la = _input->LA(1); if (!(_la == blackbirdParser::STR @@ -608,6 +1583,7 @@ size_t blackbirdParser::ShapeContext::getRuleIndex() const { return blackbirdParser::RuleShape; } + antlrcpp::Any blackbirdParser::ShapeContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitShape(this); @@ -617,25 +1593,29 @@ antlrcpp::Any blackbirdParser::ShapeContext::accept(tree::ParseTreeVisitor *visi blackbirdParser::ShapeContext* blackbirdParser::shape() { ShapeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 14, blackbirdParser::RuleShape); + enterRule(_localctx, 38, blackbirdParser::RuleShape); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(88); + setState(195); match(blackbirdParser::INT); - setState(93); + setState(200); _errHandler->sync(this); _la = _input->LA(1); while (_la == blackbirdParser::COMMA) { - setState(89); + setState(196); match(blackbirdParser::COMMA); - setState(90); + setState(197); match(blackbirdParser::INT); - setState(95); + setState(202); _errHandler->sync(this); _la = _input->LA(1); } @@ -685,6 +1665,7 @@ size_t blackbirdParser::ArrayvalContext::getRuleIndex() const { return blackbirdParser::RuleArrayval; } + antlrcpp::Any blackbirdParser::ArrayvalContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitArrayval(this); @@ -694,26 +1675,30 @@ antlrcpp::Any blackbirdParser::ArrayvalContext::accept(tree::ParseTreeVisitor *v blackbirdParser::ArrayvalContext* blackbirdParser::arrayval() { ArrayvalContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 16, blackbirdParser::RuleArrayval); + enterRule(_localctx, 40, blackbirdParser::RuleArrayval); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(102); + setState(209); _errHandler->sync(this); _la = _input->LA(1); while (_la == blackbirdParser::TAB) { - setState(96); + setState(203); match(blackbirdParser::TAB); - setState(97); + setState(204); dynamic_cast(_localctx)->arrayrowContext = arrayrow(); dynamic_cast(_localctx)->row_list.push_back(dynamic_cast(_localctx)->arrayrowContext); - setState(98); + setState(205); match(blackbirdParser::NEWLINE); - setState(104); + setState(211); _errHandler->sync(this); _la = _input->LA(1); } @@ -746,234 +1731,50 @@ std::vector blackbirdParser::ArrayrowContext::COMMA() { return getTokens(blackbirdParser::COMMA); } -tree::TerminalNode* blackbirdParser::ArrayrowContext::COMMA(size_t i) { - return getToken(blackbirdParser::COMMA, i); -} - - -size_t blackbirdParser::ArrayrowContext::getRuleIndex() const { - return blackbirdParser::RuleArrayrow; -} - -antlrcpp::Any blackbirdParser::ArrayrowContext::accept(tree::ParseTreeVisitor *visitor) { - if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitArrayrow(this); - else - return visitor->visitChildren(this); -} - -blackbirdParser::ArrayrowContext* blackbirdParser::arrayrow() { - ArrayrowContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 18, blackbirdParser::RuleArrayrow); - size_t _la = 0; - - auto onExit = finally([=] { - exitRule(); - }); - try { - enterOuterAlt(_localctx, 1); - setState(105); - expression(0); - setState(110); - _errHandler->sync(this); - _la = _input->LA(1); - while (_la == blackbirdParser::COMMA) { - setState(106); - match(blackbirdParser::COMMA); - setState(107); - expression(0); - setState(112); - _errHandler->sync(this); - _la = _input->LA(1); - } - - } - catch (RecognitionException &e) { - _errHandler->reportError(this, e); - _localctx->exception = std::current_exception(); - _errHandler->recover(this, _localctx->exception); - } - - return _localctx; -} - -//----------------- ProgramContext ------------------------------------------------------------------ - -blackbirdParser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState) - : ParserRuleContext(parent, invokingState) { -} - -tree::TerminalNode* blackbirdParser::ProgramContext::WITH() { - return getToken(blackbirdParser::WITH, 0); -} - -blackbirdParser::DeviceContext* blackbirdParser::ProgramContext::device() { - return getRuleContext(0); -} - -tree::TerminalNode* blackbirdParser::ProgramContext::COLON() { - return getToken(blackbirdParser::COLON, 0); -} - -std::vector blackbirdParser::ProgramContext::NEWLINE() { - return getTokens(blackbirdParser::NEWLINE); -} - -tree::TerminalNode* blackbirdParser::ProgramContext::NEWLINE(size_t i) { - return getToken(blackbirdParser::NEWLINE, i); -} - -blackbirdParser::ArgumentsContext* blackbirdParser::ProgramContext::arguments() { - return getRuleContext(0); -} - -std::vector blackbirdParser::ProgramContext::TAB() { - return getTokens(blackbirdParser::TAB); -} - -tree::TerminalNode* blackbirdParser::ProgramContext::TAB(size_t i) { - return getToken(blackbirdParser::TAB, i); -} - -std::vector blackbirdParser::ProgramContext::statement() { - return getRuleContexts(); -} - -blackbirdParser::StatementContext* blackbirdParser::ProgramContext::statement(size_t i) { - return getRuleContext(i); -} - - -size_t blackbirdParser::ProgramContext::getRuleIndex() const { - return blackbirdParser::RuleProgram; -} - -antlrcpp::Any blackbirdParser::ProgramContext::accept(tree::ParseTreeVisitor *visitor) { - if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitProgram(this); - else - return visitor->visitChildren(this); -} - -blackbirdParser::ProgramContext* blackbirdParser::program() { - ProgramContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 20, blackbirdParser::RuleProgram); - size_t _la = 0; - - auto onExit = finally([=] { - exitRule(); - }); - try { - size_t alt; - enterOuterAlt(_localctx, 1); - setState(113); - match(blackbirdParser::WITH); - setState(114); - device(); - setState(116); - _errHandler->sync(this); - - _la = _input->LA(1); - if (_la == blackbirdParser::LBRAC) { - setState(115); - arguments(); - } - setState(118); - match(blackbirdParser::COLON); - setState(119); - match(blackbirdParser::NEWLINE); - setState(126); - _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 10, _ctx); - while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { - if (alt == 1) { - setState(124); - _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 9, _ctx)) { - case 1: { - setState(120); - dynamic_cast(_localctx)->statementContext = statement(); - dynamic_cast(_localctx)->statement_list.push_back(dynamic_cast(_localctx)->statementContext); - break; - } - - case 2: { - setState(121); - match(blackbirdParser::NEWLINE); - break; - } - - case 3: { - setState(122); - match(blackbirdParser::TAB); - setState(123); - match(blackbirdParser::NEWLINE); - break; - } - - } - } - setState(128); - _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 10, _ctx); - } - - } - catch (RecognitionException &e) { - _errHandler->reportError(this, e); - _localctx->exception = std::current_exception(); - _errHandler->recover(this, _localctx->exception); - } - - return _localctx; -} - -//----------------- DeviceContext ------------------------------------------------------------------ - -blackbirdParser::DeviceContext::DeviceContext(ParserRuleContext *parent, size_t invokingState) - : ParserRuleContext(parent, invokingState) { -} - -tree::TerminalNode* blackbirdParser::DeviceContext::NAME() { - return getToken(blackbirdParser::NAME, 0); -} - -tree::TerminalNode* blackbirdParser::DeviceContext::DEVICE() { - return getToken(blackbirdParser::DEVICE, 0); +tree::TerminalNode* blackbirdParser::ArrayrowContext::COMMA(size_t i) { + return getToken(blackbirdParser::COMMA, i); } -size_t blackbirdParser::DeviceContext::getRuleIndex() const { - return blackbirdParser::RuleDevice; +size_t blackbirdParser::ArrayrowContext::getRuleIndex() const { + return blackbirdParser::RuleArrayrow; } -antlrcpp::Any blackbirdParser::DeviceContext::accept(tree::ParseTreeVisitor *visitor) { + +antlrcpp::Any blackbirdParser::ArrayrowContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitDevice(this); + return parserVisitor->visitArrayrow(this); else return visitor->visitChildren(this); } -blackbirdParser::DeviceContext* blackbirdParser::device() { - DeviceContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 22, blackbirdParser::RuleDevice); +blackbirdParser::ArrayrowContext* blackbirdParser::arrayrow() { + ArrayrowContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 42, blackbirdParser::RuleArrayrow); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(129); + setState(212); + expression(0); + setState(217); + _errHandler->sync(this); _la = _input->LA(1); - if (!(_la == blackbirdParser::NAME - - || _la == blackbirdParser::DEVICE)) { - _errHandler->recoverInline(this); - } - else { - _errHandler->reportMatch(this); - consume(); + while (_la == blackbirdParser::COMMA) { + setState(213); + match(blackbirdParser::COMMA); + setState(214); + expression(0); + setState(219); + _errHandler->sync(this); + _la = _input->LA(1); } } @@ -992,20 +1793,12 @@ blackbirdParser::StatementContext::StatementContext(ParserRuleContext *parent, s : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* blackbirdParser::StatementContext::TAB() { - return getToken(blackbirdParser::TAB, 0); -} - tree::TerminalNode* blackbirdParser::StatementContext::APPLY() { return getToken(blackbirdParser::APPLY, 0); } -blackbirdParser::ModesContext* blackbirdParser::StatementContext::modes() { - return getRuleContext(0); -} - -tree::TerminalNode* blackbirdParser::StatementContext::NEWLINE() { - return getToken(blackbirdParser::NEWLINE, 0); +blackbirdParser::ArrayrowContext* blackbirdParser::StatementContext::arrayrow() { + return getRuleContext(0); } blackbirdParser::OperationContext* blackbirdParser::StatementContext::operation() { @@ -1020,6 +1813,14 @@ blackbirdParser::ArgumentsContext* blackbirdParser::StatementContext::arguments( return getRuleContext(0); } +std::vector blackbirdParser::StatementContext::NEWLINE() { + return getTokens(blackbirdParser::NEWLINE); +} + +tree::TerminalNode* blackbirdParser::StatementContext::NEWLINE(size_t i) { + return getToken(blackbirdParser::NEWLINE, i); +} + tree::TerminalNode* blackbirdParser::StatementContext::LBRAC() { return getToken(blackbirdParser::LBRAC, 0); } @@ -1041,6 +1842,7 @@ size_t blackbirdParser::StatementContext::getRuleIndex() const { return blackbirdParser::RuleStatement; } + antlrcpp::Any blackbirdParser::StatementContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitStatement(this); @@ -1050,27 +1852,30 @@ antlrcpp::Any blackbirdParser::StatementContext::accept(tree::ParseTreeVisitor * blackbirdParser::StatementContext* blackbirdParser::statement() { StatementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 24, blackbirdParser::RuleStatement); + enterRule(_localctx, 44, blackbirdParser::RuleStatement); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { + size_t alt; enterOuterAlt(_localctx, 1); - setState(131); - match(blackbirdParser::TAB); - setState(134); + setState(222); _errHandler->sync(this); switch (_input->LA(1)) { case blackbirdParser::NAME: { - setState(132); + setState(220); operation(); break; } case blackbirdParser::MEASURE: { - setState(133); + setState(221); measure(); break; } @@ -1078,24 +1883,22 @@ blackbirdParser::StatementContext* blackbirdParser::statement() { default: throw NoViableAltException(this); } - setState(137); + setState(225); _errHandler->sync(this); _la = _input->LA(1); if (_la == blackbirdParser::LBRAC) { - setState(136); + setState(224); arguments(); } - setState(139); + setState(227); match(blackbirdParser::APPLY); - setState(141); + setState(229); _errHandler->sync(this); - _la = _input->LA(1); - if (_la == blackbirdParser::LBRAC - - || _la == blackbirdParser::LSQBRAC) { - setState(140); + switch (getInterpreter()->adaptivePredict(_input, 24, _ctx)) { + case 1: { + setState(228); _la = _input->LA(1); if (!(_la == blackbirdParser::LBRAC @@ -1106,17 +1909,22 @@ blackbirdParser::StatementContext* blackbirdParser::statement() { _errHandler->reportMatch(this); consume(); } + break; + } + + default: + break; } - setState(143); - modes(); - setState(145); + setState(231); + arrayrow(); + setState(233); _errHandler->sync(this); _la = _input->LA(1); if (_la == blackbirdParser::RBRAC || _la == blackbirdParser::RSQBRAC) { - setState(144); + setState(232); _la = _input->LA(1); if (!(_la == blackbirdParser::RBRAC @@ -1128,8 +1936,18 @@ blackbirdParser::StatementContext* blackbirdParser::statement() { consume(); } } - setState(147); - match(blackbirdParser::NEWLINE); + setState(238); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 26, _ctx); + while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { + if (alt == 1) { + setState(235); + match(blackbirdParser::NEWLINE); + } + setState(240); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 26, _ctx); + } } catch (RecognitionException &e) { @@ -1156,6 +1974,7 @@ size_t blackbirdParser::OperationContext::getRuleIndex() const { return blackbirdParser::RuleOperation; } + antlrcpp::Any blackbirdParser::OperationContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitOperation(this); @@ -1165,14 +1984,18 @@ antlrcpp::Any blackbirdParser::OperationContext::accept(tree::ParseTreeVisitor * blackbirdParser::OperationContext* blackbirdParser::operation() { OperationContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 26, blackbirdParser::RuleOperation); + enterRule(_localctx, 46, blackbirdParser::RuleOperation); +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(149); + setState(241); match(blackbirdParser::NAME); } @@ -1200,6 +2023,7 @@ size_t blackbirdParser::MeasureContext::getRuleIndex() const { return blackbirdParser::RuleMeasure; } + antlrcpp::Any blackbirdParser::MeasureContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitMeasure(this); @@ -1209,14 +2033,18 @@ antlrcpp::Any blackbirdParser::MeasureContext::accept(tree::ParseTreeVisitor *vi blackbirdParser::MeasureContext* blackbirdParser::measure() { MeasureContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 28, blackbirdParser::RuleMeasure); + enterRule(_localctx, 48, blackbirdParser::RuleMeasure); +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(151); + setState(243); match(blackbirdParser::MEASURE); } @@ -1229,6 +2057,205 @@ blackbirdParser::MeasureContext* blackbirdParser::measure() { return _localctx; } +//----------------- ForloopContext ------------------------------------------------------------------ + +blackbirdParser::ForloopContext::ForloopContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::ForloopContext::FOR() { + return getToken(blackbirdParser::FOR, 0); +} + +blackbirdParser::VartypeContext* blackbirdParser::ForloopContext::vartype() { + return getRuleContext(0); +} + +tree::TerminalNode* blackbirdParser::ForloopContext::NAME() { + return getToken(blackbirdParser::NAME, 0); +} + +tree::TerminalNode* blackbirdParser::ForloopContext::IN() { + return getToken(blackbirdParser::IN, 0); +} + +blackbirdParser::RangevalContext* blackbirdParser::ForloopContext::rangeval() { + return getRuleContext(0); +} + +blackbirdParser::VallistContext* blackbirdParser::ForloopContext::vallist() { + return getRuleContext(0); +} + +std::vector blackbirdParser::ForloopContext::NEWLINE() { + return getTokens(blackbirdParser::NEWLINE); +} + +tree::TerminalNode* blackbirdParser::ForloopContext::NEWLINE(size_t i) { + return getToken(blackbirdParser::NEWLINE, i); +} + +std::vector blackbirdParser::ForloopContext::TAB() { + return getTokens(blackbirdParser::TAB); +} + +tree::TerminalNode* blackbirdParser::ForloopContext::TAB(size_t i) { + return getToken(blackbirdParser::TAB, i); +} + +std::vector blackbirdParser::ForloopContext::statement() { + return getRuleContexts(); +} + +blackbirdParser::StatementContext* blackbirdParser::ForloopContext::statement(size_t i) { + return getRuleContext(i); +} + +tree::TerminalNode* blackbirdParser::ForloopContext::LBRAC() { + return getToken(blackbirdParser::LBRAC, 0); +} + +tree::TerminalNode* blackbirdParser::ForloopContext::LSQBRAC() { + return getToken(blackbirdParser::LSQBRAC, 0); +} + +tree::TerminalNode* blackbirdParser::ForloopContext::RBRAC() { + return getToken(blackbirdParser::RBRAC, 0); +} + +tree::TerminalNode* blackbirdParser::ForloopContext::RSQBRAC() { + return getToken(blackbirdParser::RSQBRAC, 0); +} + + +size_t blackbirdParser::ForloopContext::getRuleIndex() const { + return blackbirdParser::RuleForloop; +} + + +antlrcpp::Any blackbirdParser::ForloopContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitForloop(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::ForloopContext* blackbirdParser::forloop() { + ForloopContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 50, blackbirdParser::RuleForloop); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + size_t alt; + enterOuterAlt(_localctx, 1); + setState(245); + match(blackbirdParser::FOR); + setState(246); + vartype(); + setState(247); + match(blackbirdParser::NAME); + setState(248); + match(blackbirdParser::IN); + setState(257); + _errHandler->sync(this); + switch (getInterpreter()->adaptivePredict(_input, 29, _ctx)) { + case 1: { + setState(249); + rangeval(); + break; + } + + case 2: { + setState(251); + _errHandler->sync(this); + + switch (getInterpreter()->adaptivePredict(_input, 27, _ctx)) { + case 1: { + setState(250); + _la = _input->LA(1); + if (!(_la == blackbirdParser::LBRAC + + || _la == blackbirdParser::LSQBRAC)) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + break; + } + + default: + break; + } + setState(253); + vallist(); + setState(255); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == blackbirdParser::RBRAC + + || _la == blackbirdParser::RSQBRAC) { + setState(254); + _la = _input->LA(1); + if (!(_la == blackbirdParser::RBRAC + + || _la == blackbirdParser::RSQBRAC)) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + } + break; + } + + default: + break; + } + setState(262); + _errHandler->sync(this); + alt = 1; + do { + switch (alt) { + case 1: { + setState(259); + match(blackbirdParser::NEWLINE); + setState(260); + match(blackbirdParser::TAB); + setState(261); + dynamic_cast(_localctx)->statementContext = statement(); + dynamic_cast(_localctx)->statement_list.push_back(dynamic_cast(_localctx)->statementContext); + break; + } + + default: + throw NoViableAltException(this); + } + setState(264); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 30, _ctx); + } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + //----------------- ArgumentsContext ------------------------------------------------------------------ blackbirdParser::ArgumentsContext::ArgumentsContext(ParserRuleContext *parent, size_t invokingState) @@ -1243,6 +2270,14 @@ tree::TerminalNode* blackbirdParser::ArgumentsContext::RBRAC() { return getToken(blackbirdParser::RBRAC, 0); } +std::vector blackbirdParser::ArgumentsContext::COMMA() { + return getTokens(blackbirdParser::COMMA); +} + +tree::TerminalNode* blackbirdParser::ArgumentsContext::COMMA(size_t i) { + return getToken(blackbirdParser::COMMA, i); +} + std::vector blackbirdParser::ArgumentsContext::val() { return getRuleContexts(); } @@ -1259,19 +2294,12 @@ blackbirdParser::KwargContext* blackbirdParser::ArgumentsContext::kwarg(size_t i return getRuleContext(i); } -std::vector blackbirdParser::ArgumentsContext::COMMA() { - return getTokens(blackbirdParser::COMMA); -} - -tree::TerminalNode* blackbirdParser::ArgumentsContext::COMMA(size_t i) { - return getToken(blackbirdParser::COMMA, i); -} - size_t blackbirdParser::ArgumentsContext::getRuleIndex() const { return blackbirdParser::RuleArguments; } + antlrcpp::Any blackbirdParser::ArgumentsContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitArguments(this); @@ -1281,64 +2309,81 @@ antlrcpp::Any blackbirdParser::ArgumentsContext::accept(tree::ParseTreeVisitor * blackbirdParser::ArgumentsContext* blackbirdParser::arguments() { ArgumentsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 30, blackbirdParser::RuleArguments); + enterRule(_localctx, 52, blackbirdParser::RuleArguments); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { + size_t alt; enterOuterAlt(_localctx, 1); - setState(153); + setState(266); match(blackbirdParser::LBRAC); - setState(162); + setState(275); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 16, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 32, _ctx)) { case 1: { - setState(154); + setState(267); dynamic_cast(_localctx)->valContext = val(); dynamic_cast(_localctx)->val_list.push_back(dynamic_cast(_localctx)->valContext); - setState(159); + setState(272); _errHandler->sync(this); - _la = _input->LA(1); - while (_la == blackbirdParser::COMMA) { - setState(155); - match(blackbirdParser::COMMA); - setState(156); - dynamic_cast(_localctx)->valContext = val(); - dynamic_cast(_localctx)->val_list.push_back(dynamic_cast(_localctx)->valContext); - setState(161); + alt = getInterpreter()->adaptivePredict(_input, 31, _ctx); + while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { + if (alt == 1) { + setState(268); + match(blackbirdParser::COMMA); + setState(269); + dynamic_cast(_localctx)->valContext = val(); + dynamic_cast(_localctx)->val_list.push_back(dynamic_cast(_localctx)->valContext); + } + setState(274); _errHandler->sync(this); - _la = _input->LA(1); + alt = getInterpreter()->adaptivePredict(_input, 31, _ctx); } break; } + default: + break; + } + setState(278); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == blackbirdParser::COMMA) { + setState(277); + match(blackbirdParser::COMMA); } - setState(172); + setState(288); _errHandler->sync(this); _la = _input->LA(1); if (_la == blackbirdParser::NAME) { - setState(164); + setState(280); dynamic_cast(_localctx)->kwargContext = kwarg(); dynamic_cast(_localctx)->kwarg_list.push_back(dynamic_cast(_localctx)->kwargContext); - setState(169); + setState(285); _errHandler->sync(this); _la = _input->LA(1); while (_la == blackbirdParser::COMMA) { - setState(165); + setState(281); match(blackbirdParser::COMMA); - setState(166); + setState(282); dynamic_cast(_localctx)->kwargContext = kwarg(); dynamic_cast(_localctx)->kwarg_list.push_back(dynamic_cast(_localctx)->kwargContext); - setState(171); + setState(287); _errHandler->sync(this); _la = _input->LA(1); } } - setState(174); + setState(290); match(blackbirdParser::RBRAC); } @@ -1369,11 +2414,24 @@ blackbirdParser::ValContext* blackbirdParser::KwargContext::val() { return getRuleContext(0); } +tree::TerminalNode* blackbirdParser::KwargContext::LSQBRAC() { + return getToken(blackbirdParser::LSQBRAC, 0); +} + +tree::TerminalNode* blackbirdParser::KwargContext::RSQBRAC() { + return getToken(blackbirdParser::RSQBRAC, 0); +} + +blackbirdParser::VallistContext* blackbirdParser::KwargContext::vallist() { + return getRuleContext(0); +} + size_t blackbirdParser::KwargContext::getRuleIndex() const { return blackbirdParser::RuleKwarg; } + antlrcpp::Any blackbirdParser::KwargContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitKwarg(this); @@ -1381,21 +2439,105 @@ antlrcpp::Any blackbirdParser::KwargContext::accept(tree::ParseTreeVisitor *visi return visitor->visitChildren(this); } -blackbirdParser::KwargContext* blackbirdParser::kwarg() { - KwargContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 32, blackbirdParser::RuleKwarg); +blackbirdParser::KwargContext* blackbirdParser::kwarg() { + KwargContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 54, blackbirdParser::RuleKwarg); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(292); + match(blackbirdParser::NAME); + setState(293); + match(blackbirdParser::ASSIGN); + setState(300); + _errHandler->sync(this); + switch (_input->LA(1)) { + case blackbirdParser::PLUS: + case blackbirdParser::MINUS: + case blackbirdParser::INT: + case blackbirdParser::FLOAT: + case blackbirdParser::COMPLEX: + case blackbirdParser::STR: + case blackbirdParser::BOOL: + case blackbirdParser::PI: + case blackbirdParser::SQRT: + case blackbirdParser::SIN: + case blackbirdParser::COS: + case blackbirdParser::TAN: + case blackbirdParser::ARCSIN: + case blackbirdParser::ARCCOS: + case blackbirdParser::ARCTAN: + case blackbirdParser::SINH: + case blackbirdParser::COSH: + case blackbirdParser::TANH: + case blackbirdParser::ARCSINH: + case blackbirdParser::ARCCOSH: + case blackbirdParser::ARCTANH: + case blackbirdParser::EXP: + case blackbirdParser::LOG: + case blackbirdParser::LBRAC: + case blackbirdParser::LBRACE: + case blackbirdParser::REGREF: + case blackbirdParser::NAME: { + setState(294); + val(); + break; + } + + case blackbirdParser::LSQBRAC: { + setState(295); + match(blackbirdParser::LSQBRAC); + setState(297); + _errHandler->sync(this); - auto onExit = finally([=] { - exitRule(); - }); - try { - enterOuterAlt(_localctx, 1); - setState(176); - match(blackbirdParser::NAME); - setState(177); - match(blackbirdParser::ASSIGN); - setState(178); - val(); + _la = _input->LA(1); + if ((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & ((1ULL << blackbirdParser::PLUS) + | (1ULL << blackbirdParser::MINUS) + | (1ULL << blackbirdParser::INT) + | (1ULL << blackbirdParser::FLOAT) + | (1ULL << blackbirdParser::COMPLEX) + | (1ULL << blackbirdParser::STR) + | (1ULL << blackbirdParser::BOOL) + | (1ULL << blackbirdParser::PI) + | (1ULL << blackbirdParser::SQRT) + | (1ULL << blackbirdParser::SIN) + | (1ULL << blackbirdParser::COS) + | (1ULL << blackbirdParser::TAN) + | (1ULL << blackbirdParser::ARCSIN) + | (1ULL << blackbirdParser::ARCCOS) + | (1ULL << blackbirdParser::ARCTAN) + | (1ULL << blackbirdParser::SINH) + | (1ULL << blackbirdParser::COSH) + | (1ULL << blackbirdParser::TANH) + | (1ULL << blackbirdParser::ARCSINH) + | (1ULL << blackbirdParser::ARCCOSH) + | (1ULL << blackbirdParser::ARCTANH) + | (1ULL << blackbirdParser::EXP) + | (1ULL << blackbirdParser::LOG) + | (1ULL << blackbirdParser::LBRAC) + | (1ULL << blackbirdParser::LBRACE) + | (1ULL << blackbirdParser::REGREF) + | (1ULL << blackbirdParser::NAME))) != 0)) { + setState(296); + vallist(); + } + setState(299); + match(blackbirdParser::RSQBRAC); + break; + } + + default: + throw NoViableAltException(this); + } } catch (RecognitionException &e) { @@ -1426,6 +2568,7 @@ size_t blackbirdParser::ValContext::getRuleIndex() const { return blackbirdParser::RuleVal; } + antlrcpp::Any blackbirdParser::ValContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitVal(this); @@ -1435,19 +2578,23 @@ antlrcpp::Any blackbirdParser::ValContext::accept(tree::ParseTreeVisitor *visito blackbirdParser::ValContext* blackbirdParser::val() { ValContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 34, blackbirdParser::RuleVal); + enterRule(_localctx, 56, blackbirdParser::RuleVal); +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(182); + setState(304); _errHandler->sync(this); switch (_input->LA(1)) { case blackbirdParser::STR: case blackbirdParser::BOOL: { - setState(180); + setState(302); nonnumeric(); break; } @@ -1461,10 +2608,23 @@ blackbirdParser::ValContext* blackbirdParser::val() { case blackbirdParser::SQRT: case blackbirdParser::SIN: case blackbirdParser::COS: + case blackbirdParser::TAN: + case blackbirdParser::ARCSIN: + case blackbirdParser::ARCCOS: + case blackbirdParser::ARCTAN: + case blackbirdParser::SINH: + case blackbirdParser::COSH: + case blackbirdParser::TANH: + case blackbirdParser::ARCSINH: + case blackbirdParser::ARCCOSH: + case blackbirdParser::ARCTANH: case blackbirdParser::EXP: + case blackbirdParser::LOG: case blackbirdParser::LBRAC: + case blackbirdParser::LBRACE: + case blackbirdParser::REGREF: case blackbirdParser::NAME: { - setState(181); + setState(303); expression(0); break; } @@ -1483,61 +2643,66 @@ blackbirdParser::ValContext* blackbirdParser::val() { return _localctx; } -//----------------- ModesContext ------------------------------------------------------------------ +//----------------- VallistContext ------------------------------------------------------------------ -blackbirdParser::ModesContext::ModesContext(ParserRuleContext *parent, size_t invokingState) +blackbirdParser::VallistContext::VallistContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector blackbirdParser::ModesContext::INT() { - return getTokens(blackbirdParser::INT); +std::vector blackbirdParser::VallistContext::val() { + return getRuleContexts(); } -tree::TerminalNode* blackbirdParser::ModesContext::INT(size_t i) { - return getToken(blackbirdParser::INT, i); +blackbirdParser::ValContext* blackbirdParser::VallistContext::val(size_t i) { + return getRuleContext(i); } -std::vector blackbirdParser::ModesContext::COMMA() { +std::vector blackbirdParser::VallistContext::COMMA() { return getTokens(blackbirdParser::COMMA); } -tree::TerminalNode* blackbirdParser::ModesContext::COMMA(size_t i) { +tree::TerminalNode* blackbirdParser::VallistContext::COMMA(size_t i) { return getToken(blackbirdParser::COMMA, i); } -size_t blackbirdParser::ModesContext::getRuleIndex() const { - return blackbirdParser::RuleModes; +size_t blackbirdParser::VallistContext::getRuleIndex() const { + return blackbirdParser::RuleVallist; } -antlrcpp::Any blackbirdParser::ModesContext::accept(tree::ParseTreeVisitor *visitor) { + +antlrcpp::Any blackbirdParser::VallistContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitModes(this); + return parserVisitor->visitVallist(this); else return visitor->visitChildren(this); } -blackbirdParser::ModesContext* blackbirdParser::modes() { - ModesContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 36, blackbirdParser::RuleModes); +blackbirdParser::VallistContext* blackbirdParser::vallist() { + VallistContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 58, blackbirdParser::RuleVallist); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(184); - match(blackbirdParser::INT); - setState(189); + setState(306); + val(); + setState(311); _errHandler->sync(this); _la = _input->LA(1); while (_la == blackbirdParser::COMMA) { - setState(185); + setState(307); match(blackbirdParser::COMMA); - setState(186); - match(blackbirdParser::INT); - setState(191); + setState(308); + val(); + setState(313); _errHandler->sync(this); _la = _input->LA(1); } @@ -1552,6 +2717,82 @@ blackbirdParser::ModesContext* blackbirdParser::modes() { return _localctx; } +//----------------- RangevalContext ------------------------------------------------------------------ + +blackbirdParser::RangevalContext::RangevalContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector blackbirdParser::RangevalContext::INT() { + return getTokens(blackbirdParser::INT); +} + +tree::TerminalNode* blackbirdParser::RangevalContext::INT(size_t i) { + return getToken(blackbirdParser::INT, i); +} + +std::vector blackbirdParser::RangevalContext::COLON() { + return getTokens(blackbirdParser::COLON); +} + +tree::TerminalNode* blackbirdParser::RangevalContext::COLON(size_t i) { + return getToken(blackbirdParser::COLON, i); +} + + +size_t blackbirdParser::RangevalContext::getRuleIndex() const { + return blackbirdParser::RuleRangeval; +} + + +antlrcpp::Any blackbirdParser::RangevalContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitRangeval(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::RangevalContext* blackbirdParser::rangeval() { + RangevalContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 60, blackbirdParser::RuleRangeval); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(314); + match(blackbirdParser::INT); + setState(315); + match(blackbirdParser::COLON); + setState(316); + match(blackbirdParser::INT); + setState(319); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == blackbirdParser::COLON) { + setState(317); + match(blackbirdParser::COLON); + setState(318); + match(blackbirdParser::INT); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + //----------------- ExpressionContext ------------------------------------------------------------------ blackbirdParser::ExpressionContext::ExpressionContext(ParserRuleContext *parent, size_t invokingState) @@ -1567,6 +2808,21 @@ void blackbirdParser::ExpressionContext::copyFrom(ExpressionContext *ctx) { ParserRuleContext::copyFrom(ctx); } +//----------------- ParameterLabelContext ------------------------------------------------------------------ + +blackbirdParser::ParameterContext* blackbirdParser::ParameterLabelContext::parameter() { + return getRuleContext(0); +} + +blackbirdParser::ParameterLabelContext::ParameterLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + + +antlrcpp::Any blackbirdParser::ParameterLabelContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitParameterLabel(this); + else + return visitor->visitChildren(this); +} //----------------- BracketsLabelContext ------------------------------------------------------------------ tree::TerminalNode* blackbirdParser::BracketsLabelContext::LBRAC() { @@ -1583,6 +2839,7 @@ tree::TerminalNode* blackbirdParser::BracketsLabelContext::RBRAC() { blackbirdParser::BracketsLabelContext::BracketsLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + antlrcpp::Any blackbirdParser::BracketsLabelContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitBracketsLabel(this); @@ -1605,6 +2862,7 @@ tree::TerminalNode* blackbirdParser::SignLabelContext::MINUS() { blackbirdParser::SignLabelContext::SignLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + antlrcpp::Any blackbirdParser::SignLabelContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitSignLabel(this); @@ -1627,6 +2885,7 @@ tree::TerminalNode* blackbirdParser::PowerLabelContext::PWR() { blackbirdParser::PowerLabelContext::PowerLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + antlrcpp::Any blackbirdParser::PowerLabelContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitPowerLabel(this); @@ -1641,6 +2900,7 @@ blackbirdParser::NumberContext* blackbirdParser::NumberLabelContext::number() { blackbirdParser::NumberLabelContext::NumberLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + antlrcpp::Any blackbirdParser::NumberLabelContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitNumberLabel(this); @@ -1649,18 +2909,50 @@ antlrcpp::Any blackbirdParser::NumberLabelContext::accept(tree::ParseTreeVisitor } //----------------- VariableLabelContext ------------------------------------------------------------------ +tree::TerminalNode* blackbirdParser::VariableLabelContext::REGREF() { + return getToken(blackbirdParser::REGREF, 0); +} + tree::TerminalNode* blackbirdParser::VariableLabelContext::NAME() { return getToken(blackbirdParser::NAME, 0); } blackbirdParser::VariableLabelContext::VariableLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + antlrcpp::Any blackbirdParser::VariableLabelContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitVariableLabel(this); else return visitor->visitChildren(this); } +//----------------- ArrayIdxLabelContext ------------------------------------------------------------------ + +tree::TerminalNode* blackbirdParser::ArrayIdxLabelContext::NAME() { + return getToken(blackbirdParser::NAME, 0); +} + +tree::TerminalNode* blackbirdParser::ArrayIdxLabelContext::LSQBRAC() { + return getToken(blackbirdParser::LSQBRAC, 0); +} + +blackbirdParser::ExpressionContext* blackbirdParser::ArrayIdxLabelContext::expression() { + return getRuleContext(0); +} + +tree::TerminalNode* blackbirdParser::ArrayIdxLabelContext::RSQBRAC() { + return getToken(blackbirdParser::RSQBRAC, 0); +} + +blackbirdParser::ArrayIdxLabelContext::ArrayIdxLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + + +antlrcpp::Any blackbirdParser::ArrayIdxLabelContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitArrayIdxLabel(this); + else + return visitor->visitChildren(this); +} //----------------- MulLabelContext ------------------------------------------------------------------ std::vector blackbirdParser::MulLabelContext::expression() { @@ -1681,6 +2973,7 @@ tree::TerminalNode* blackbirdParser::MulLabelContext::DIVIDE() { blackbirdParser::MulLabelContext::MulLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + antlrcpp::Any blackbirdParser::MulLabelContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitMulLabel(this); @@ -1707,6 +3000,7 @@ tree::TerminalNode* blackbirdParser::FunctionLabelContext::RBRAC() { blackbirdParser::FunctionLabelContext::FunctionLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + antlrcpp::Any blackbirdParser::FunctionLabelContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitFunctionLabel(this); @@ -1733,6 +3027,7 @@ tree::TerminalNode* blackbirdParser::AddLabelContext::MINUS() { blackbirdParser::AddLabelContext::AddLabelContext(ExpressionContext *ctx) { copyFrom(ctx); } + antlrcpp::Any blackbirdParser::AddLabelContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitAddLabel(this); @@ -1749,120 +3044,151 @@ blackbirdParser::ExpressionContext* blackbirdParser::expression(int precedence) size_t parentState = getState(); blackbirdParser::ExpressionContext *_localctx = _tracker.createInstance(_ctx, parentState); blackbirdParser::ExpressionContext *previousContext = _localctx; - size_t startState = 38; - enterRecursionRule(_localctx, 38, blackbirdParser::RuleExpression, precedence); + (void)previousContext; // Silence compiler, in case the context is not used by generated code. + size_t startState = 62; + enterRecursionRule(_localctx, 62, blackbirdParser::RuleExpression, precedence); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif unrollRecursionContexts(parentContext); }); try { size_t alt; enterOuterAlt(_localctx, 1); - setState(206); + setState(341); _errHandler->sync(this); - switch (_input->LA(1)) { - case blackbirdParser::LBRAC: { - _localctx = _tracker.createInstance(_localctx); - _ctx = _localctx; - previousContext = _localctx; + switch (getInterpreter()->adaptivePredict(_input, 41, _ctx)) { + case 1: { + _localctx = _tracker.createInstance(_localctx); + _ctx = _localctx; + previousContext = _localctx; - setState(193); - match(blackbirdParser::LBRAC); - setState(194); - expression(0); - setState(195); - match(blackbirdParser::RBRAC); - break; - } + setState(322); + match(blackbirdParser::LBRAC); + setState(323); + expression(0); + setState(324); + match(blackbirdParser::RBRAC); + break; + } - case blackbirdParser::PLUS: - case blackbirdParser::MINUS: { - _localctx = _tracker.createInstance(_localctx); - _ctx = _localctx; - previousContext = _localctx; - setState(197); - _la = _input->LA(1); - if (!(_la == blackbirdParser::PLUS + case 2: { + _localctx = _tracker.createInstance(_localctx); + _ctx = _localctx; + previousContext = _localctx; + setState(326); + _la = _input->LA(1); + if (!(_la == blackbirdParser::PLUS - || _la == blackbirdParser::MINUS)) { - _errHandler->recoverInline(this); - } - else { - _errHandler->reportMatch(this); - consume(); - } - setState(198); - expression(7); - break; + || _la == blackbirdParser::MINUS)) { + _errHandler->recoverInline(this); } - - case blackbirdParser::SQRT: - case blackbirdParser::SIN: - case blackbirdParser::COS: - case blackbirdParser::EXP: { - _localctx = _tracker.createInstance(_localctx); - _ctx = _localctx; - previousContext = _localctx; - setState(199); - function(); - setState(200); - match(blackbirdParser::LBRAC); - setState(201); - expression(0); - setState(202); - match(blackbirdParser::RBRAC); - break; + else { + _errHandler->reportMatch(this); + consume(); } + setState(327); + expression(9); + break; + } - case blackbirdParser::INT: - case blackbirdParser::FLOAT: - case blackbirdParser::COMPLEX: - case blackbirdParser::PI: { - _localctx = _tracker.createInstance(_localctx); - _ctx = _localctx; - previousContext = _localctx; - setState(204); - number(); - break; - } + case 3: { + _localctx = _tracker.createInstance(_localctx); + _ctx = _localctx; + previousContext = _localctx; + setState(328); + function(); + setState(329); + match(blackbirdParser::LBRAC); + setState(330); + expression(0); + setState(331); + match(blackbirdParser::RBRAC); + break; + } - case blackbirdParser::NAME: { - _localctx = _tracker.createInstance(_localctx); - _ctx = _localctx; - previousContext = _localctx; - setState(205); - match(blackbirdParser::NAME); - break; + case 4: { + _localctx = _tracker.createInstance(_localctx); + _ctx = _localctx; + previousContext = _localctx; + setState(333); + number(); + break; + } + + case 5: { + _localctx = _tracker.createInstance(_localctx); + _ctx = _localctx; + previousContext = _localctx; + setState(334); + _la = _input->LA(1); + if (!(_la == blackbirdParser::REGREF + + || _la == blackbirdParser::NAME)) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); } + break; + } + + case 6: { + _localctx = _tracker.createInstance(_localctx); + _ctx = _localctx; + previousContext = _localctx; + setState(335); + match(blackbirdParser::NAME); + setState(336); + match(blackbirdParser::LSQBRAC); + setState(337); + expression(0); + setState(338); + match(blackbirdParser::RSQBRAC); + break; + } + + case 7: { + _localctx = _tracker.createInstance(_localctx); + _ctx = _localctx; + previousContext = _localctx; + setState(340); + parameter(); + break; + } default: - throw NoViableAltException(this); + break; } _ctx->stop = _input->LT(-1); - setState(219); + setState(354); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 23, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 43, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { if (!_parseListeners.empty()) triggerExitRuleEvent(); previousContext = _localctx; - setState(217); + setState(352); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 22, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 42, _ctx)) { case 1: { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(208); + setState(343); - if (!(precpred(_ctx, 6))) throw FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(209); + if (!(precpred(_ctx, 8))) throw FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(344); match(blackbirdParser::PWR); - setState(210); - expression(6); + setState(345); + expression(8); break; } @@ -1870,10 +3196,10 @@ blackbirdParser::ExpressionContext* blackbirdParser::expression(int precedence) auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(211); + setState(346); - if (!(precpred(_ctx, 5))) throw FailedPredicateException(this, "precpred(_ctx, 5)"); - setState(212); + if (!(precpred(_ctx, 7))) throw FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(347); _la = _input->LA(1); if (!(_la == blackbirdParser::TIMES @@ -1884,8 +3210,8 @@ blackbirdParser::ExpressionContext* blackbirdParser::expression(int precedence) _errHandler->reportMatch(this); consume(); } - setState(213); - expression(6); + setState(348); + expression(8); break; } @@ -1893,10 +3219,10 @@ blackbirdParser::ExpressionContext* blackbirdParser::expression(int precedence) auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(214); + setState(349); - if (!(precpred(_ctx, 4))) throw FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(215); + if (!(precpred(_ctx, 6))) throw FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(350); _la = _input->LA(1); if (!(_la == blackbirdParser::PLUS @@ -1907,16 +3233,18 @@ blackbirdParser::ExpressionContext* blackbirdParser::expression(int precedence) _errHandler->reportMatch(this); consume(); } - setState(216); - expression(5); + setState(351); + expression(7); break; } + default: + break; } } - setState(221); + setState(356); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 23, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 43, _ctx); } } catch (RecognitionException &e) { @@ -1927,6 +3255,67 @@ blackbirdParser::ExpressionContext* blackbirdParser::expression(int precedence) return _localctx; } +//----------------- ParameterContext ------------------------------------------------------------------ + +blackbirdParser::ParameterContext::ParameterContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* blackbirdParser::ParameterContext::LBRACE() { + return getToken(blackbirdParser::LBRACE, 0); +} + +tree::TerminalNode* blackbirdParser::ParameterContext::NAME() { + return getToken(blackbirdParser::NAME, 0); +} + +tree::TerminalNode* blackbirdParser::ParameterContext::RBRACE() { + return getToken(blackbirdParser::RBRACE, 0); +} + + +size_t blackbirdParser::ParameterContext::getRuleIndex() const { + return blackbirdParser::RuleParameter; +} + + +antlrcpp::Any blackbirdParser::ParameterContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitParameter(this); + else + return visitor->visitChildren(this); +} + +blackbirdParser::ParameterContext* blackbirdParser::parameter() { + ParameterContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 64, blackbirdParser::RuleParameter); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(357); + match(blackbirdParser::LBRACE); + setState(358); + match(blackbirdParser::NAME); + setState(359); + match(blackbirdParser::RBRACE); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + //----------------- NumberContext ------------------------------------------------------------------ blackbirdParser::NumberContext::NumberContext(ParserRuleContext *parent, size_t invokingState) @@ -1954,6 +3343,7 @@ size_t blackbirdParser::NumberContext::getRuleIndex() const { return blackbirdParser::RuleNumber; } + antlrcpp::Any blackbirdParser::NumberContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitNumber(this); @@ -1963,15 +3353,19 @@ antlrcpp::Any blackbirdParser::NumberContext::accept(tree::ParseTreeVisitor *vis blackbirdParser::NumberContext* blackbirdParser::number() { NumberContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 40, blackbirdParser::RuleNumber); + enterRule(_localctx, 66, blackbirdParser::RuleNumber); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(222); + setState(361); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & ((1ULL << blackbirdParser::INT) @@ -2009,10 +3403,54 @@ tree::TerminalNode* blackbirdParser::FunctionContext::COS() { return getToken(blackbirdParser::COS, 0); } +tree::TerminalNode* blackbirdParser::FunctionContext::TAN() { + return getToken(blackbirdParser::TAN, 0); +} + +tree::TerminalNode* blackbirdParser::FunctionContext::ARCSIN() { + return getToken(blackbirdParser::ARCSIN, 0); +} + +tree::TerminalNode* blackbirdParser::FunctionContext::ARCCOS() { + return getToken(blackbirdParser::ARCCOS, 0); +} + +tree::TerminalNode* blackbirdParser::FunctionContext::ARCTAN() { + return getToken(blackbirdParser::ARCTAN, 0); +} + +tree::TerminalNode* blackbirdParser::FunctionContext::SINH() { + return getToken(blackbirdParser::SINH, 0); +} + +tree::TerminalNode* blackbirdParser::FunctionContext::COSH() { + return getToken(blackbirdParser::COSH, 0); +} + +tree::TerminalNode* blackbirdParser::FunctionContext::TANH() { + return getToken(blackbirdParser::TANH, 0); +} + +tree::TerminalNode* blackbirdParser::FunctionContext::ARCSINH() { + return getToken(blackbirdParser::ARCSINH, 0); +} + +tree::TerminalNode* blackbirdParser::FunctionContext::ARCCOSH() { + return getToken(blackbirdParser::ARCCOSH, 0); +} + +tree::TerminalNode* blackbirdParser::FunctionContext::ARCTANH() { + return getToken(blackbirdParser::ARCTANH, 0); +} + tree::TerminalNode* blackbirdParser::FunctionContext::SQRT() { return getToken(blackbirdParser::SQRT, 0); } +tree::TerminalNode* blackbirdParser::FunctionContext::LOG() { + return getToken(blackbirdParser::LOG, 0); +} + tree::TerminalNode* blackbirdParser::FunctionContext::EXP() { return getToken(blackbirdParser::EXP, 0); } @@ -2022,6 +3460,7 @@ size_t blackbirdParser::FunctionContext::getRuleIndex() const { return blackbirdParser::RuleFunction; } + antlrcpp::Any blackbirdParser::FunctionContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) return parserVisitor->visitFunction(this); @@ -2031,21 +3470,36 @@ antlrcpp::Any blackbirdParser::FunctionContext::accept(tree::ParseTreeVisitor *v blackbirdParser::FunctionContext* blackbirdParser::function() { FunctionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 42, blackbirdParser::RuleFunction); + enterRule(_localctx, 68, blackbirdParser::RuleFunction); size_t _la = 0; +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else auto onExit = finally([=] { +#endif exitRule(); }); try { enterOuterAlt(_localctx, 1); - setState(224); + setState(363); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & ((1ULL << blackbirdParser::SQRT) | (1ULL << blackbirdParser::SIN) | (1ULL << blackbirdParser::COS) - | (1ULL << blackbirdParser::EXP))) != 0))) { + | (1ULL << blackbirdParser::TAN) + | (1ULL << blackbirdParser::ARCSIN) + | (1ULL << blackbirdParser::ARCCOS) + | (1ULL << blackbirdParser::ARCTAN) + | (1ULL << blackbirdParser::SINH) + | (1ULL << blackbirdParser::COSH) + | (1ULL << blackbirdParser::TANH) + | (1ULL << blackbirdParser::ARCSINH) + | (1ULL << blackbirdParser::ARCCOSH) + | (1ULL << blackbirdParser::ARCTANH) + | (1ULL << blackbirdParser::EXP) + | (1ULL << blackbirdParser::LOG))) != 0))) { _errHandler->recoverInline(this); } else { @@ -2065,7 +3519,7 @@ blackbirdParser::FunctionContext* blackbirdParser::function() { bool blackbirdParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) { switch (ruleIndex) { - case 19: return expressionSempred(dynamic_cast(context), predicateIndex); + case 31: return expressionSempred(dynamic_cast(context), predicateIndex); default: break; @@ -2075,9 +3529,9 @@ bool blackbirdParser::sempred(RuleContext *context, size_t ruleIndex, size_t pre bool blackbirdParser::expressionSempred(ExpressionContext *_localctx, size_t predicateIndex) { switch (predicateIndex) { - case 0: return precpred(_ctx, 6); - case 1: return precpred(_ctx, 5); - case 2: return precpred(_ctx, 4); + case 0: return precpred(_ctx, 8); + case 1: return precpred(_ctx, 7); + case 2: return precpred(_ctx, 6); default: break; @@ -2094,26 +3548,33 @@ atn::ATN blackbirdParser::_atn; std::vector blackbirdParser::_serializedATN; std::vector blackbirdParser::_ruleNames = { - "start", "varblock", "expressionvar", "arrayvar", "name", "vartype", "nonnumeric", - "shape", "arrayval", "arrayrow", "program", "device", "statement", "operation", - "measure", "arguments", "kwarg", "val", "modes", "expression", "number", - "function" + "start", "metadatablock", "declarename", "programname", "version", "versionnumber", + "target", "device", "declaretype", "programtype", "include", "program", + "expressionvar", "arrayvar", "name", "invalid", "reserved", "vartype", + "nonnumeric", "shape", "arrayval", "arrayrow", "statement", "operation", + "measure", "forloop", "arguments", "kwarg", "val", "vallist", "rangeval", + "expression", "parameter", "number", "function" }; std::vector blackbirdParser::_literalNames = { - "", "'+'", "'-'", "'*'", "'/'", "'**'", "'='", "", "", "", "", "", "", - "'pi'", "", "", "", "'with'", "'sqrt'", "'sin'", "'cos'", "'exp'", "'.'", - "','", "':'", "'\"'", "'('", "')'", "'['", "']'", "'|'", "'array'", "'float'", - "'complex'", "'int'", "'str'", "'bool'" + "", "'+'", "'-'", "'*'", "'/'", "'**'", "'='", "'for'", "'in'", "", "", + "", "", "", "", "'pi'", "", "", "", "'name'", "'version'", "'target'", + "'type'", "'include'", "'sqrt'", "'sin'", "'cos'", "'tan'", "'arcsin'", + "'arccos'", "'arctan'", "'sinh'", "'cosh'", "'tanh'", "'arcsinh'", "'arccosh'", + "'arctanh'", "'exp'", "'log'", "'.'", "','", "':'", "'\"'", "'('", "')'", + "'['", "']'", "'{'", "'}'", "'|'", "'array'", "'float'", "'complex'", + "'int'", "'str'", "'bool'" }; std::vector blackbirdParser::_symbolicNames = { - "", "PLUS", "MINUS", "TIMES", "DIVIDE", "PWR", "ASSIGN", "INT", "FLOAT", - "COMPLEX", "STR", "BOOL", "SEQUENCE", "PI", "NEWLINE", "TAB", "SPACE", - "WITH", "SQRT", "SIN", "COS", "EXP", "PERIOD", "COMMA", "COLON", "QUOTE", - "LBRAC", "RBRAC", "LSQBRAC", "RSQBRAC", "APPLY", "TYPE_ARRAY", "TYPE_FLOAT", - "TYPE_COMPLEX", "TYPE_INT", "TYPE_STR", "TYPE_BOOL", "MEASURE", "NAME", - "DEVICE", "COMMENT", "ANY" + "", "PLUS", "MINUS", "TIMES", "DIVIDE", "PWR", "ASSIGN", "FOR", "IN", + "INT", "FLOAT", "COMPLEX", "STR", "BOOL", "SEQUENCE", "PI", "NEWLINE", + "TAB", "SPACE", "PROGNAME", "VERSION", "TARGET", "PROGTYPE", "INCLUDE", + "SQRT", "SIN", "COS", "TAN", "ARCSIN", "ARCCOS", "ARCTAN", "SINH", "COSH", + "TANH", "ARCSINH", "ARCCOSH", "ARCTANH", "EXP", "LOG", "PERIOD", "COMMA", + "COLON", "QUOTE", "LBRAC", "RBRAC", "LSQBRAC", "RSQBRAC", "LBRACE", "RBRACE", + "APPLY", "TYPE_ARRAY", "TYPE_FLOAT", "TYPE_COMPLEX", "TYPE_INT", "TYPE_STR", + "TYPE_BOOL", "REGREF", "MEASURE", "NAME", "DEVICE", "COMMENT", "ANY" }; dfa::Vocabulary blackbirdParser::_vocabulary(_literalNames, _symbolicNames); @@ -2134,162 +3595,277 @@ blackbirdParser::Initializer::Initializer() { } } - _serializedATN = { + static const uint16_t serializedATNSegment0[] = { 0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964, - 0x3, 0x2b, 0xe5, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4, 0x4, 0x9, - 0x4, 0x4, 0x5, 0x9, 0x5, 0x4, 0x6, 0x9, 0x6, 0x4, 0x7, 0x9, 0x7, 0x4, - 0x8, 0x9, 0x8, 0x4, 0x9, 0x9, 0x9, 0x4, 0xa, 0x9, 0xa, 0x4, 0xb, 0x9, - 0xb, 0x4, 0xc, 0x9, 0xc, 0x4, 0xd, 0x9, 0x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7, 0xa, + 0x2, 0x2, 0xfb, 0x104, 0x5, 0x3e, 0x20, 0x2, 0xfc, 0xfe, 0x9, 0x6, + 0x2, 0x2, 0xfd, 0xfc, 0x3, 0x2, 0x2, 0x2, 0xfd, 0xfe, 0x3, 0x2, 0x2, + 0x2, 0xfe, 0xff, 0x3, 0x2, 0x2, 0x2, 0xff, 0x101, 0x5, 0x3c, 0x1f, + 0x2, 0x100, 0x102, 0x9, 0x7, 0x2, 0x2, 0x101, 0x100, 0x3, 0x2, 0x2, + 0x2, 0x101, 0x102, 0x3, 0x2, 0x2, 0x2, 0x102, 0x104, 0x3, 0x2, 0x2, + 0x2, 0x103, 0xfb, 0x3, 0x2, 0x2, 0x2, 0x103, 0xfd, 0x3, 0x2, 0x2, + 0x2, 0x104, 0x108, 0x3, 0x2, 0x2, 0x2, 0x105, 0x106, 0x7, 0x12, 0x2, + 0x2, 0x106, 0x107, 0x7, 0x13, 0x2, 0x2, 0x107, 0x109, 0x5, 0x2e, + 0x18, 0x2, 0x108, 0x105, 0x3, 0x2, 0x2, 0x2, 0x109, 0x10a, 0x3, 0x2, + 0x2, 0x2, 0x10a, 0x108, 0x3, 0x2, 0x2, 0x2, 0x10a, 0x10b, 0x3, 0x2, + 0x2, 0x2, 0x10b, 0x35, 0x3, 0x2, 0x2, 0x2, 0x10c, 0x115, 0x7, 0x2d, + 0x2, 0x2, 0x10d, 0x112, 0x5, 0x3a, 0x1e, 0x2, 0x10e, 0x10f, 0x7, + 0x2a, 0x2, 0x2, 0x10f, 0x111, 0x5, 0x3a, 0x1e, 0x2, 0x110, 0x10e, + 0x3, 0x2, 0x2, 0x2, 0x111, 0x114, 0x3, 0x2, 0x2, 0x2, 0x112, 0x110, + 0x3, 0x2, 0x2, 0x2, 0x112, 0x113, 0x3, 0x2, 0x2, 0x2, 0x113, 0x116, + 0x3, 0x2, 0x2, 0x2, 0x114, 0x112, 0x3, 0x2, 0x2, 0x2, 0x115, 0x10d, + 0x3, 0x2, 0x2, 0x2, 0x115, 0x116, 0x3, 0x2, 0x2, 0x2, 0x116, 0x118, + 0x3, 0x2, 0x2, 0x2, 0x117, 0x119, 0x7, 0x2a, 0x2, 0x2, 0x118, 0x117, + 0x3, 0x2, 0x2, 0x2, 0x118, 0x119, 0x3, 0x2, 0x2, 0x2, 0x119, 0x122, + 0x3, 0x2, 0x2, 0x2, 0x11a, 0x11f, 0x5, 0x38, 0x1d, 0x2, 0x11b, 0x11c, + 0x7, 0x2a, 0x2, 0x2, 0x11c, 0x11e, 0x5, 0x38, 0x1d, 0x2, 0x11d, 0x11b, + 0x3, 0x2, 0x2, 0x2, 0x11e, 0x121, 0x3, 0x2, 0x2, 0x2, 0x11f, 0x11d, + 0x3, 0x2, 0x2, 0x2, 0x11f, 0x120, 0x3, 0x2, 0x2, 0x2, 0x120, 0x123, + 0x3, 0x2, 0x2, 0x2, 0x121, 0x11f, 0x3, 0x2, 0x2, 0x2, 0x122, 0x11a, + 0x3, 0x2, 0x2, 0x2, 0x122, 0x123, 0x3, 0x2, 0x2, 0x2, 0x123, 0x124, + 0x3, 0x2, 0x2, 0x2, 0x124, 0x125, 0x7, 0x2e, 0x2, 0x2, 0x125, 0x37, + 0x3, 0x2, 0x2, 0x2, 0x126, 0x127, 0x7, 0x3c, 0x2, 0x2, 0x127, 0x12e, + 0x7, 0x8, 0x2, 0x2, 0x128, 0x12f, 0x5, 0x3a, 0x1e, 0x2, 0x129, 0x12b, + 0x7, 0x2f, 0x2, 0x2, 0x12a, 0x12c, 0x5, 0x3c, 0x1f, 0x2, 0x12b, 0x12a, + 0x3, 0x2, 0x2, 0x2, 0x12b, 0x12c, 0x3, 0x2, 0x2, 0x2, 0x12c, 0x12d, + 0x3, 0x2, 0x2, 0x2, 0x12d, 0x12f, 0x7, 0x30, 0x2, 0x2, 0x12e, 0x128, + 0x3, 0x2, 0x2, 0x2, 0x12e, 0x129, 0x3, 0x2, 0x2, 0x2, 0x12f, 0x39, + 0x3, 0x2, 0x2, 0x2, 0x130, 0x133, 0x5, 0x26, 0x14, 0x2, 0x131, 0x133, + 0x5, 0x40, 0x21, 0x2, 0x132, 0x130, 0x3, 0x2, 0x2, 0x2, 0x132, 0x131, + 0x3, 0x2, 0x2, 0x2, 0x133, 0x3b, 0x3, 0x2, 0x2, 0x2, 0x134, 0x139, + 0x5, 0x3a, 0x1e, 0x2, 0x135, 0x136, 0x7, 0x2a, 0x2, 0x2, 0x136, 0x138, + 0x5, 0x3a, 0x1e, 0x2, 0x137, 0x135, 0x3, 0x2, 0x2, 0x2, 0x138, 0x13b, + 0x3, 0x2, 0x2, 0x2, 0x139, 0x137, 0x3, 0x2, 0x2, 0x2, 0x139, 0x13a, + 0x3, 0x2, 0x2, 0x2, 0x13a, 0x3d, 0x3, 0x2, 0x2, 0x2, 0x13b, 0x139, + 0x3, 0x2, 0x2, 0x2, 0x13c, 0x13d, 0x7, 0xb, 0x2, 0x2, 0x13d, 0x13e, + 0x7, 0x2b, 0x2, 0x2, 0x13e, 0x141, 0x7, 0xb, 0x2, 0x2, 0x13f, 0x140, + 0x7, 0x2b, 0x2, 0x2, 0x140, 0x142, 0x7, 0xb, 0x2, 0x2, 0x141, 0x13f, + 0x3, 0x2, 0x2, 0x2, 0x141, 0x142, 0x3, 0x2, 0x2, 0x2, 0x142, 0x3f, + 0x3, 0x2, 0x2, 0x2, 0x143, 0x144, 0x8, 0x21, 0x1, 0x2, 0x144, 0x145, + 0x7, 0x2d, 0x2, 0x2, 0x145, 0x146, 0x5, 0x40, 0x21, 0x2, 0x146, 0x147, + 0x7, 0x2e, 0x2, 0x2, 0x147, 0x158, 0x3, 0x2, 0x2, 0x2, 0x148, 0x149, + 0x9, 0x8, 0x2, 0x2, 0x149, 0x158, 0x5, 0x40, 0x21, 0xb, 0x14a, 0x14b, + 0x5, 0x46, 0x24, 0x2, 0x14b, 0x14c, 0x7, 0x2d, 0x2, 0x2, 0x14c, 0x14d, + 0x5, 0x40, 0x21, 0x2, 0x14d, 0x14e, 0x7, 0x2e, 0x2, 0x2, 0x14e, 0x158, + 0x3, 0x2, 0x2, 0x2, 0x14f, 0x158, 0x5, 0x44, 0x23, 0x2, 0x150, 0x158, + 0x9, 0x9, 0x2, 0x2, 0x151, 0x152, 0x7, 0x3c, 0x2, 0x2, 0x152, 0x153, + 0x7, 0x2f, 0x2, 0x2, 0x153, 0x154, 0x5, 0x40, 0x21, 0x2, 0x154, 0x155, + 0x7, 0x30, 0x2, 0x2, 0x155, 0x158, 0x3, 0x2, 0x2, 0x2, 0x156, 0x158, + 0x5, 0x42, 0x22, 0x2, 0x157, 0x143, 0x3, 0x2, 0x2, 0x2, 0x157, 0x148, + 0x3, 0x2, 0x2, 0x2, 0x157, 0x14a, 0x3, 0x2, 0x2, 0x2, 0x157, 0x14f, + 0x3, 0x2, 0x2, 0x2, 0x157, 0x150, 0x3, 0x2, 0x2, 0x2, 0x157, 0x151, + 0x3, 0x2, 0x2, 0x2, 0x157, 0x156, 0x3, 0x2, 0x2, 0x2, 0x158, 0x164, + 0x3, 0x2, 0x2, 0x2, 0x159, 0x15a, 0xc, 0xa, 0x2, 0x2, 0x15a, 0x15b, + 0x7, 0x7, 0x2, 0x2, 0x15b, 0x163, 0x5, 0x40, 0x21, 0xa, 0x15c, 0x15d, + 0xc, 0x9, 0x2, 0x2, 0x15d, 0x15e, 0x9, 0xa, 0x2, 0x2, 0x15e, 0x163, + 0x5, 0x40, 0x21, 0xa, 0x15f, 0x160, 0xc, 0x8, 0x2, 0x2, 0x160, 0x161, + 0x9, 0x8, 0x2, 0x2, 0x161, 0x163, 0x5, 0x40, 0x21, 0x9, 0x162, 0x159, + 0x3, 0x2, 0x2, 0x2, 0x162, 0x15c, 0x3, 0x2, 0x2, 0x2, 0x162, 0x15f, + 0x3, 0x2, 0x2, 0x2, 0x163, 0x166, 0x3, 0x2, 0x2, 0x2, 0x164, 0x162, + 0x3, 0x2, 0x2, 0x2, 0x164, 0x165, 0x3, 0x2, 0x2, 0x2, 0x165, 0x41, + 0x3, 0x2, 0x2, 0x2, 0x166, 0x164, 0x3, 0x2, 0x2, 0x2, 0x167, 0x168, + 0x7, 0x31, 0x2, 0x2, 0x168, 0x169, 0x7, 0x3c, 0x2, 0x2, 0x169, 0x16a, + 0x7, 0x32, 0x2, 0x2, 0x16a, 0x43, 0x3, 0x2, 0x2, 0x2, 0x16b, 0x16c, + 0x9, 0xb, 0x2, 0x2, 0x16c, 0x45, 0x3, 0x2, 0x2, 0x2, 0x16d, 0x16e, + 0x9, 0xc, 0x2, 0x2, 0x16e, 0x47, 0x3, 0x2, 0x2, 0x2, 0x2e, 0x4b, + 0x52, 0x59, 0x62, 0x68, 0x6b, 0x70, 0x73, 0x77, 0x79, 0x89, 0x90, + 0x9c, 0x9e, 0xa6, 0xaf, 0xb5, 0xb9, 0xbd, 0xca, 0xd3, 0xdb, 0xe0, + 0xe3, 0xe7, 0xeb, 0xf0, 0xfd, 0x101, 0x103, 0x10a, 0x112, 0x115, + 0x118, 0x11f, 0x122, 0x12b, 0x12e, 0x132, 0x139, 0x141, 0x157, 0x162, + 0x164, }; + _serializedATN.insert(_serializedATN.end(), serializedATNSegment0, + serializedATNSegment0 + sizeof(serializedATNSegment0) / sizeof(serializedATNSegment0[0])); + + atn::ATNDeserializer deserializer; _atn = deserializer.deserialize(_serializedATN); diff --git a/blackbird_cpp/blackbirdParser.h b/blackbird_cpp/blackbirdParser.h index 798c310..c5d22bd 100644 --- a/blackbird_cpp/blackbirdParser.h +++ b/blackbird_cpp/blackbirdParser.h @@ -1,5 +1,5 @@ -// Generated from blackbird.g4 by ANTLR 4.7.1 +// Generated from blackbird.g4 by ANTLR 4.9.2 #pragma once @@ -12,25 +12,31 @@ class blackbirdParser : public antlr4::Parser { public: enum { - PLUS = 1, MINUS = 2, TIMES = 3, DIVIDE = 4, PWR = 5, ASSIGN = 6, INT = 7, - FLOAT = 8, COMPLEX = 9, STR = 10, BOOL = 11, SEQUENCE = 12, PI = 13, - NEWLINE = 14, TAB = 15, SPACE = 16, WITH = 17, SQRT = 18, SIN = 19, - COS = 20, EXP = 21, PERIOD = 22, COMMA = 23, COLON = 24, QUOTE = 25, - LBRAC = 26, RBRAC = 27, LSQBRAC = 28, RSQBRAC = 29, APPLY = 30, TYPE_ARRAY = 31, - TYPE_FLOAT = 32, TYPE_COMPLEX = 33, TYPE_INT = 34, TYPE_STR = 35, TYPE_BOOL = 36, - MEASURE = 37, NAME = 38, DEVICE = 39, COMMENT = 40, ANY = 41 + PLUS = 1, MINUS = 2, TIMES = 3, DIVIDE = 4, PWR = 5, ASSIGN = 6, FOR = 7, + IN = 8, INT = 9, FLOAT = 10, COMPLEX = 11, STR = 12, BOOL = 13, SEQUENCE = 14, + PI = 15, NEWLINE = 16, TAB = 17, SPACE = 18, PROGNAME = 19, VERSION = 20, + TARGET = 21, PROGTYPE = 22, INCLUDE = 23, SQRT = 24, SIN = 25, COS = 26, + TAN = 27, ARCSIN = 28, ARCCOS = 29, ARCTAN = 30, SINH = 31, COSH = 32, + TANH = 33, ARCSINH = 34, ARCCOSH = 35, ARCTANH = 36, EXP = 37, LOG = 38, + PERIOD = 39, COMMA = 40, COLON = 41, QUOTE = 42, LBRAC = 43, RBRAC = 44, + LSQBRAC = 45, RSQBRAC = 46, LBRACE = 47, RBRACE = 48, APPLY = 49, TYPE_ARRAY = 50, + TYPE_FLOAT = 51, TYPE_COMPLEX = 52, TYPE_INT = 53, TYPE_STR = 54, TYPE_BOOL = 55, + REGREF = 56, MEASURE = 57, NAME = 58, DEVICE = 59, COMMENT = 60, ANY = 61 }; enum { - RuleStart = 0, RuleVarblock = 1, RuleExpressionvar = 2, RuleArrayvar = 3, - RuleName = 4, RuleVartype = 5, RuleNonnumeric = 6, RuleShape = 7, RuleArrayval = 8, - RuleArrayrow = 9, RuleProgram = 10, RuleDevice = 11, RuleStatement = 12, - RuleOperation = 13, RuleMeasure = 14, RuleArguments = 15, RuleKwarg = 16, - RuleVal = 17, RuleModes = 18, RuleExpression = 19, RuleNumber = 20, - RuleFunction = 21 - }; - - blackbirdParser(antlr4::TokenStream *input); + RuleStart = 0, RuleMetadatablock = 1, RuleDeclarename = 2, RuleProgramname = 3, + RuleVersion = 4, RuleVersionnumber = 5, RuleTarget = 6, RuleDevice = 7, + RuleDeclaretype = 8, RuleProgramtype = 9, RuleInclude = 10, RuleProgram = 11, + RuleExpressionvar = 12, RuleArrayvar = 13, RuleName = 14, RuleInvalid = 15, + RuleReserved = 16, RuleVartype = 17, RuleNonnumeric = 18, RuleShape = 19, + RuleArrayval = 20, RuleArrayrow = 21, RuleStatement = 22, RuleOperation = 23, + RuleMeasure = 24, RuleForloop = 25, RuleArguments = 26, RuleKwarg = 27, + RuleVal = 28, RuleVallist = 29, RuleRangeval = 30, RuleExpression = 31, + RuleParameter = 32, RuleNumber = 33, RuleFunction = 34 + }; + + explicit blackbirdParser(antlr4::TokenStream *input); ~blackbirdParser(); virtual std::string getGrammarFileName() const override; @@ -41,25 +47,38 @@ class blackbirdParser : public antlr4::Parser { class StartContext; - class VarblockContext; + class MetadatablockContext; + class DeclarenameContext; + class ProgramnameContext; + class VersionContext; + class VersionnumberContext; + class TargetContext; + class DeviceContext; + class DeclaretypeContext; + class ProgramtypeContext; + class IncludeContext; + class ProgramContext; class ExpressionvarContext; class ArrayvarContext; class NameContext; + class InvalidContext; + class ReservedContext; class VartypeContext; class NonnumericContext; class ShapeContext; class ArrayvalContext; class ArrayrowContext; - class ProgramContext; - class DeviceContext; class StatementContext; class OperationContext; class MeasureContext; + class ForloopContext; class ArgumentsContext; class KwargContext; class ValContext; - class ModesContext; + class VallistContext; + class RangevalContext; class ExpressionContext; + class ParameterContext; class NumberContext; class FunctionContext; @@ -67,38 +86,195 @@ class blackbirdParser : public antlr4::Parser { public: StartContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - VarblockContext *varblock(); + MetadatablockContext *metadatablock(); ProgramContext *program(); antlr4::tree::TerminalNode *EOF(); std::vector NEWLINE(); antlr4::tree::TerminalNode* NEWLINE(size_t i); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; StartContext* start(); - class VarblockContext : public antlr4::ParserRuleContext { + class MetadatablockContext : public antlr4::ParserRuleContext { + public: + blackbirdParser::IncludeContext *includeContext = nullptr; + std::vector include_list; + MetadatablockContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + DeclarenameContext *declarename(); + VersionContext *version(); + std::vector NEWLINE(); + antlr4::tree::TerminalNode* NEWLINE(size_t i); + TargetContext *target(); + DeclaretypeContext *declaretype(); + std::vector include(); + IncludeContext* include(size_t i); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + MetadatablockContext* metadatablock(); + + class DeclarenameContext : public antlr4::ParserRuleContext { + public: + DeclarenameContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *PROGNAME(); + ProgramnameContext *programname(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + DeclarenameContext* declarename(); + + class ProgramnameContext : public antlr4::ParserRuleContext { + public: + ProgramnameContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *NAME(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ProgramnameContext* programname(); + + class VersionContext : public antlr4::ParserRuleContext { + public: + VersionContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *VERSION(); + VersionnumberContext *versionnumber(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + VersionContext* version(); + + class VersionnumberContext : public antlr4::ParserRuleContext { + public: + VersionnumberContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *FLOAT(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + VersionnumberContext* versionnumber(); + + class TargetContext : public antlr4::ParserRuleContext { + public: + TargetContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *TARGET(); + DeviceContext *device(); + ArgumentsContext *arguments(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + TargetContext* target(); + + class DeviceContext : public antlr4::ParserRuleContext { + public: + DeviceContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *NAME(); + antlr4::tree::TerminalNode *DEVICE(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + DeviceContext* device(); + + class DeclaretypeContext : public antlr4::ParserRuleContext { + public: + DeclaretypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *PROGTYPE(); + ProgramtypeContext *programtype(); + ArgumentsContext *arguments(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + DeclaretypeContext* declaretype(); + + class ProgramtypeContext : public antlr4::ParserRuleContext { + public: + ProgramtypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *NAME(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ProgramtypeContext* programtype(); + + class IncludeContext : public antlr4::ParserRuleContext { public: - blackbirdParser::ExpressionvarContext *expressionvarContext = nullptr;; - std::vector var_list;; - blackbirdParser::ArrayvarContext *arrayvarContext = nullptr;; - std::vector array_list;; - VarblockContext(antlr4::ParserRuleContext *parent, size_t invokingState); + IncludeContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *INCLUDE(); + antlr4::tree::TerminalNode *STR(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + IncludeContext* include(); + + class ProgramContext : public antlr4::ParserRuleContext { + public: + blackbirdParser::ForloopContext *forloopContext = nullptr; + std::vector for_list; + blackbirdParser::ExpressionvarContext *expressionvarContext = nullptr; + std::vector var_list; + blackbirdParser::ArrayvarContext *arrayvarContext = nullptr; + std::vector array_list; + blackbirdParser::StatementContext *statementContext = nullptr; + std::vector statement_list; + ProgramContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector NEWLINE(); antlr4::tree::TerminalNode* NEWLINE(size_t i); + std::vector forloop(); + ForloopContext* forloop(size_t i); std::vector expressionvar(); ExpressionvarContext* expressionvar(size_t i); std::vector arrayvar(); ArrayvarContext* arrayvar(size_t i); + std::vector statement(); + StatementContext* statement(size_t i); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; - VarblockContext* varblock(); + ProgramContext* program(); class ExpressionvarContext : public antlr4::ParserRuleContext { public: @@ -110,6 +286,7 @@ class blackbirdParser : public antlr4::Parser { ExpressionContext *expression(); NonnumericContext *nonnumeric(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -126,10 +303,12 @@ class blackbirdParser : public antlr4::Parser { antlr4::tree::TerminalNode *ASSIGN(); antlr4::tree::TerminalNode *NEWLINE(); ArrayvalContext *arrayval(); + ParameterContext *parameter(); antlr4::tree::TerminalNode *LSQBRAC(); ShapeContext *shape(); antlr4::tree::TerminalNode *RSQBRAC(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -140,14 +319,46 @@ class blackbirdParser : public antlr4::Parser { public: NameContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; + InvalidContext *invalid(); antlr4::tree::TerminalNode *NAME(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; NameContext* name(); + class InvalidContext : public antlr4::ParserRuleContext { + public: + InvalidContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *REGREF(); + ReservedContext *reserved(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + InvalidContext* invalid(); + + class ReservedContext : public antlr4::ParserRuleContext { + public: + ReservedContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *PROGNAME(); + antlr4::tree::TerminalNode *VERSION(); + antlr4::tree::TerminalNode *TARGET(); + antlr4::tree::TerminalNode *PROGTYPE(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ReservedContext* reserved(); + class VartypeContext : public antlr4::ParserRuleContext { public: VartypeContext(antlr4::ParserRuleContext *parent, size_t invokingState); @@ -159,6 +370,7 @@ class blackbirdParser : public antlr4::Parser { antlr4::tree::TerminalNode *TYPE_STR(); antlr4::tree::TerminalNode *TYPE_BOOL(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -172,6 +384,7 @@ class blackbirdParser : public antlr4::Parser { antlr4::tree::TerminalNode *STR(); antlr4::tree::TerminalNode *BOOL(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -187,6 +400,7 @@ class blackbirdParser : public antlr4::Parser { std::vector COMMA(); antlr4::tree::TerminalNode* COMMA(size_t i); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -195,8 +409,8 @@ class blackbirdParser : public antlr4::Parser { class ArrayvalContext : public antlr4::ParserRuleContext { public: - blackbirdParser::ArrayrowContext *arrayrowContext = nullptr;; - std::vector row_list;; + blackbirdParser::ArrayrowContext *arrayrowContext = nullptr; + std::vector row_list; ArrayvalContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; std::vector TAB(); @@ -206,6 +420,7 @@ class blackbirdParser : public antlr4::Parser { std::vector arrayrow(); ArrayrowContext* arrayrow(size_t i); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -221,64 +436,30 @@ class blackbirdParser : public antlr4::Parser { std::vector COMMA(); antlr4::tree::TerminalNode* COMMA(size_t i); - virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; - - }; - - ArrayrowContext* arrayrow(); - - class ProgramContext : public antlr4::ParserRuleContext { - public: - blackbirdParser::StatementContext *statementContext = nullptr;; - std::vector statement_list;; - ProgramContext(antlr4::ParserRuleContext *parent, size_t invokingState); - virtual size_t getRuleIndex() const override; - antlr4::tree::TerminalNode *WITH(); - DeviceContext *device(); - antlr4::tree::TerminalNode *COLON(); - std::vector NEWLINE(); - antlr4::tree::TerminalNode* NEWLINE(size_t i); - ArgumentsContext *arguments(); - std::vector TAB(); - antlr4::tree::TerminalNode* TAB(size_t i); - std::vector statement(); - StatementContext* statement(size_t i); - - virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; - - }; - - ProgramContext* program(); - - class DeviceContext : public antlr4::ParserRuleContext { - public: - DeviceContext(antlr4::ParserRuleContext *parent, size_t invokingState); - virtual size_t getRuleIndex() const override; - antlr4::tree::TerminalNode *NAME(); - antlr4::tree::TerminalNode *DEVICE(); virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; - DeviceContext* device(); + ArrayrowContext* arrayrow(); class StatementContext : public antlr4::ParserRuleContext { public: StatementContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - antlr4::tree::TerminalNode *TAB(); antlr4::tree::TerminalNode *APPLY(); - ModesContext *modes(); - antlr4::tree::TerminalNode *NEWLINE(); + ArrayrowContext *arrayrow(); OperationContext *operation(); MeasureContext *measure(); ArgumentsContext *arguments(); + std::vector NEWLINE(); + antlr4::tree::TerminalNode* NEWLINE(size_t i); antlr4::tree::TerminalNode *LBRAC(); antlr4::tree::TerminalNode *LSQBRAC(); antlr4::tree::TerminalNode *RBRAC(); antlr4::tree::TerminalNode *RSQBRAC(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -291,6 +472,7 @@ class blackbirdParser : public antlr4::Parser { virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *NAME(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -303,28 +485,60 @@ class blackbirdParser : public antlr4::Parser { virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *MEASURE(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; MeasureContext* measure(); + class ForloopContext : public antlr4::ParserRuleContext { + public: + blackbirdParser::StatementContext *statementContext = nullptr; + std::vector statement_list; + ForloopContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *FOR(); + VartypeContext *vartype(); + antlr4::tree::TerminalNode *NAME(); + antlr4::tree::TerminalNode *IN(); + RangevalContext *rangeval(); + VallistContext *vallist(); + std::vector NEWLINE(); + antlr4::tree::TerminalNode* NEWLINE(size_t i); + std::vector TAB(); + antlr4::tree::TerminalNode* TAB(size_t i); + std::vector statement(); + StatementContext* statement(size_t i); + antlr4::tree::TerminalNode *LBRAC(); + antlr4::tree::TerminalNode *LSQBRAC(); + antlr4::tree::TerminalNode *RBRAC(); + antlr4::tree::TerminalNode *RSQBRAC(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ForloopContext* forloop(); + class ArgumentsContext : public antlr4::ParserRuleContext { public: - blackbirdParser::ValContext *valContext = nullptr;; - std::vector val_list;; - blackbirdParser::KwargContext *kwargContext = nullptr;; - std::vector kwarg_list;; + blackbirdParser::ValContext *valContext = nullptr; + std::vector val_list; + blackbirdParser::KwargContext *kwargContext = nullptr; + std::vector kwarg_list; ArgumentsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *LBRAC(); antlr4::tree::TerminalNode *RBRAC(); + std::vector COMMA(); + antlr4::tree::TerminalNode* COMMA(size_t i); std::vector val(); ValContext* val(size_t i); std::vector kwarg(); KwargContext* kwarg(size_t i); - std::vector COMMA(); - antlr4::tree::TerminalNode* COMMA(size_t i); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; @@ -339,6 +553,10 @@ class blackbirdParser : public antlr4::Parser { antlr4::tree::TerminalNode *NAME(); antlr4::tree::TerminalNode *ASSIGN(); ValContext *val(); + antlr4::tree::TerminalNode *LSQBRAC(); + antlr4::tree::TerminalNode *RSQBRAC(); + VallistContext *vallist(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; @@ -353,32 +571,50 @@ class blackbirdParser : public antlr4::Parser { NonnumericContext *nonnumeric(); ExpressionContext *expression(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; ValContext* val(); - class ModesContext : public antlr4::ParserRuleContext { + class VallistContext : public antlr4::ParserRuleContext { public: - ModesContext(antlr4::ParserRuleContext *parent, size_t invokingState); + VallistContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector INT(); - antlr4::tree::TerminalNode* INT(size_t i); + std::vector val(); + ValContext* val(size_t i); std::vector COMMA(); antlr4::tree::TerminalNode* COMMA(size_t i); + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + VallistContext* vallist(); + + class RangevalContext : public antlr4::ParserRuleContext { + public: + RangevalContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector INT(); + antlr4::tree::TerminalNode* INT(size_t i); + std::vector COLON(); + antlr4::tree::TerminalNode* COLON(size_t i); + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; - ModesContext* modes(); + RangevalContext* rangeval(); class ExpressionContext : public antlr4::ParserRuleContext { public: ExpressionContext(antlr4::ParserRuleContext *parent, size_t invokingState); - ExpressionContext() : antlr4::ParserRuleContext() { } + ExpressionContext() = default; void copyFrom(ExpressionContext *context); using antlr4::ParserRuleContext::copyFrom; @@ -387,6 +623,15 @@ class blackbirdParser : public antlr4::Parser { }; + class ParameterLabelContext : public ExpressionContext { + public: + ParameterLabelContext(ExpressionContext *ctx); + + ParameterContext *parameter(); + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + }; + class BracketsLabelContext : public ExpressionContext { public: BracketsLabelContext(ExpressionContext *ctx); @@ -394,6 +639,7 @@ class blackbirdParser : public antlr4::Parser { antlr4::tree::TerminalNode *LBRAC(); ExpressionContext *expression(); antlr4::tree::TerminalNode *RBRAC(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -404,6 +650,7 @@ class blackbirdParser : public antlr4::Parser { ExpressionContext *expression(); antlr4::tree::TerminalNode *PLUS(); antlr4::tree::TerminalNode *MINUS(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -414,6 +661,7 @@ class blackbirdParser : public antlr4::Parser { std::vector expression(); ExpressionContext* expression(size_t i); antlr4::tree::TerminalNode *PWR(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -422,6 +670,7 @@ class blackbirdParser : public antlr4::Parser { NumberLabelContext(ExpressionContext *ctx); NumberContext *number(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -429,7 +678,21 @@ class blackbirdParser : public antlr4::Parser { public: VariableLabelContext(ExpressionContext *ctx); + antlr4::tree::TerminalNode *REGREF(); + antlr4::tree::TerminalNode *NAME(); + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + }; + + class ArrayIdxLabelContext : public ExpressionContext { + public: + ArrayIdxLabelContext(ExpressionContext *ctx); + antlr4::tree::TerminalNode *NAME(); + antlr4::tree::TerminalNode *LSQBRAC(); + ExpressionContext *expression(); + antlr4::tree::TerminalNode *RSQBRAC(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -441,6 +704,7 @@ class blackbirdParser : public antlr4::Parser { ExpressionContext* expression(size_t i); antlr4::tree::TerminalNode *TIMES(); antlr4::tree::TerminalNode *DIVIDE(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -452,6 +716,7 @@ class blackbirdParser : public antlr4::Parser { antlr4::tree::TerminalNode *LBRAC(); ExpressionContext *expression(); antlr4::tree::TerminalNode *RBRAC(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -463,11 +728,27 @@ class blackbirdParser : public antlr4::Parser { ExpressionContext* expression(size_t i); antlr4::tree::TerminalNode *PLUS(); antlr4::tree::TerminalNode *MINUS(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; ExpressionContext* expression(); ExpressionContext* expression(int precedence); + class ParameterContext : public antlr4::ParserRuleContext { + public: + ParameterContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *LBRACE(); + antlr4::tree::TerminalNode *NAME(); + antlr4::tree::TerminalNode *RBRACE(); + + + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ParameterContext* parameter(); + class NumberContext : public antlr4::ParserRuleContext { public: NumberContext(antlr4::ParserRuleContext *parent, size_t invokingState); @@ -477,6 +758,7 @@ class blackbirdParser : public antlr4::Parser { antlr4::tree::TerminalNode *COMPLEX(); antlr4::tree::TerminalNode *PI(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; @@ -489,9 +771,21 @@ class blackbirdParser : public antlr4::Parser { virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *SIN(); antlr4::tree::TerminalNode *COS(); + antlr4::tree::TerminalNode *TAN(); + antlr4::tree::TerminalNode *ARCSIN(); + antlr4::tree::TerminalNode *ARCCOS(); + antlr4::tree::TerminalNode *ARCTAN(); + antlr4::tree::TerminalNode *SINH(); + antlr4::tree::TerminalNode *COSH(); + antlr4::tree::TerminalNode *TANH(); + antlr4::tree::TerminalNode *ARCSINH(); + antlr4::tree::TerminalNode *ARCCOSH(); + antlr4::tree::TerminalNode *ARCTANH(); antlr4::tree::TerminalNode *SQRT(); + antlr4::tree::TerminalNode *LOG(); antlr4::tree::TerminalNode *EXP(); + virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; diff --git a/blackbird_cpp/blackbirdVisitor.cpp b/blackbird_cpp/blackbirdVisitor.cpp index 43928ef..91cf4b5 100644 --- a/blackbird_cpp/blackbirdVisitor.cpp +++ b/blackbird_cpp/blackbirdVisitor.cpp @@ -1,5 +1,5 @@ -// Generated from blackbird.g4 by ANTLR 4.7.1 +// Generated from blackbird.g4 by ANTLR 4.9.2 #include "blackbirdVisitor.h" diff --git a/blackbird_cpp/blackbirdVisitor.h b/blackbird_cpp/blackbirdVisitor.h index 985a7f0..21ff441 100644 --- a/blackbird_cpp/blackbirdVisitor.h +++ b/blackbird_cpp/blackbirdVisitor.h @@ -1,5 +1,5 @@ -// Generated from blackbird.g4 by ANTLR 4.7.1 +// Generated from blackbird.g4 by ANTLR 4.9.2 #pragma once @@ -21,7 +21,27 @@ class blackbirdVisitor : public antlr4::tree::AbstractParseTreeVisitor { */ virtual antlrcpp::Any visitStart(blackbirdParser::StartContext *context) = 0; - virtual antlrcpp::Any visitVarblock(blackbirdParser::VarblockContext *context) = 0; + virtual antlrcpp::Any visitMetadatablock(blackbirdParser::MetadatablockContext *context) = 0; + + virtual antlrcpp::Any visitDeclarename(blackbirdParser::DeclarenameContext *context) = 0; + + virtual antlrcpp::Any visitProgramname(blackbirdParser::ProgramnameContext *context) = 0; + + virtual antlrcpp::Any visitVersion(blackbirdParser::VersionContext *context) = 0; + + virtual antlrcpp::Any visitVersionnumber(blackbirdParser::VersionnumberContext *context) = 0; + + virtual antlrcpp::Any visitTarget(blackbirdParser::TargetContext *context) = 0; + + virtual antlrcpp::Any visitDevice(blackbirdParser::DeviceContext *context) = 0; + + virtual antlrcpp::Any visitDeclaretype(blackbirdParser::DeclaretypeContext *context) = 0; + + virtual antlrcpp::Any visitProgramtype(blackbirdParser::ProgramtypeContext *context) = 0; + + virtual antlrcpp::Any visitInclude(blackbirdParser::IncludeContext *context) = 0; + + virtual antlrcpp::Any visitProgram(blackbirdParser::ProgramContext *context) = 0; virtual antlrcpp::Any visitExpressionvar(blackbirdParser::ExpressionvarContext *context) = 0; @@ -29,6 +49,10 @@ class blackbirdVisitor : public antlr4::tree::AbstractParseTreeVisitor { virtual antlrcpp::Any visitName(blackbirdParser::NameContext *context) = 0; + virtual antlrcpp::Any visitInvalid(blackbirdParser::InvalidContext *context) = 0; + + virtual antlrcpp::Any visitReserved(blackbirdParser::ReservedContext *context) = 0; + virtual antlrcpp::Any visitVartype(blackbirdParser::VartypeContext *context) = 0; virtual antlrcpp::Any visitNonnumeric(blackbirdParser::NonnumericContext *context) = 0; @@ -39,23 +63,25 @@ class blackbirdVisitor : public antlr4::tree::AbstractParseTreeVisitor { virtual antlrcpp::Any visitArrayrow(blackbirdParser::ArrayrowContext *context) = 0; - virtual antlrcpp::Any visitProgram(blackbirdParser::ProgramContext *context) = 0; - - virtual antlrcpp::Any visitDevice(blackbirdParser::DeviceContext *context) = 0; - virtual antlrcpp::Any visitStatement(blackbirdParser::StatementContext *context) = 0; virtual antlrcpp::Any visitOperation(blackbirdParser::OperationContext *context) = 0; virtual antlrcpp::Any visitMeasure(blackbirdParser::MeasureContext *context) = 0; + virtual antlrcpp::Any visitForloop(blackbirdParser::ForloopContext *context) = 0; + virtual antlrcpp::Any visitArguments(blackbirdParser::ArgumentsContext *context) = 0; virtual antlrcpp::Any visitKwarg(blackbirdParser::KwargContext *context) = 0; virtual antlrcpp::Any visitVal(blackbirdParser::ValContext *context) = 0; - virtual antlrcpp::Any visitModes(blackbirdParser::ModesContext *context) = 0; + virtual antlrcpp::Any visitVallist(blackbirdParser::VallistContext *context) = 0; + + virtual antlrcpp::Any visitRangeval(blackbirdParser::RangevalContext *context) = 0; + + virtual antlrcpp::Any visitParameterLabel(blackbirdParser::ParameterLabelContext *context) = 0; virtual antlrcpp::Any visitBracketsLabel(blackbirdParser::BracketsLabelContext *context) = 0; @@ -67,12 +93,16 @@ class blackbirdVisitor : public antlr4::tree::AbstractParseTreeVisitor { virtual antlrcpp::Any visitVariableLabel(blackbirdParser::VariableLabelContext *context) = 0; + virtual antlrcpp::Any visitArrayIdxLabel(blackbirdParser::ArrayIdxLabelContext *context) = 0; + virtual antlrcpp::Any visitMulLabel(blackbirdParser::MulLabelContext *context) = 0; virtual antlrcpp::Any visitFunctionLabel(blackbirdParser::FunctionLabelContext *context) = 0; virtual antlrcpp::Any visitAddLabel(blackbirdParser::AddLabelContext *context) = 0; + virtual antlrcpp::Any visitParameter(blackbirdParser::ParameterContext *context) = 0; + virtual antlrcpp::Any visitNumber(blackbirdParser::NumberContext *context) = 0; virtual antlrcpp::Any visitFunction(blackbirdParser::FunctionContext *context) = 0; diff --git a/blackbird_python/blackbird/blackbirdLexer.py b/blackbird_python/blackbird/blackbirdLexer.py index 74eeb30..2b3db5d 100644 --- a/blackbird_python/blackbird/blackbirdLexer.py +++ b/blackbird_python/blackbird/blackbirdLexer.py @@ -1,8 +1,11 @@ -# Generated from src/blackbird.g4 by ANTLR 4.8 +# Generated from blackbird.g4 by ANTLR 4.9.2 from antlr4 import * from io import StringIO -from typing.io import TextIO import sys +if sys.version_info[1] > 5: + from typing import TextIO +else: + from typing.io import TextIO @@ -315,7 +318,7 @@ class blackbirdLexer(Lexer): def __init__(self, input=None, output:TextIO = sys.stdout): super().__init__(input, output) - self.checkVersion("4.8") + self.checkVersion("4.9.2") self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._actions = None self._predicates = None diff --git a/blackbird_python/blackbird/blackbirdListener.py b/blackbird_python/blackbird/blackbirdListener.py index deac424..60a15e3 100644 --- a/blackbird_python/blackbird/blackbirdListener.py +++ b/blackbird_python/blackbird/blackbirdListener.py @@ -1,4 +1,4 @@ -# Generated from src/blackbird.g4 by ANTLR 4.8 +# Generated from blackbird.g4 by ANTLR 4.9.2 from antlr4 import * if __name__ is not None and "." in __name__: from .blackbirdParser import blackbirdParser diff --git a/blackbird_python/blackbird/blackbirdParser.py b/blackbird_python/blackbird/blackbirdParser.py index ebe1f60..63fefde 100644 --- a/blackbird_python/blackbird/blackbirdParser.py +++ b/blackbird_python/blackbird/blackbirdParser.py @@ -1,4 +1,4 @@ -# Generated from src/blackbird.g4 by ANTLR 4.8 +# Generated from blackbird.g4 by ANTLR 4.9.2 # encoding: utf-8 from antlr4 import * from io import StringIO @@ -325,7 +325,7 @@ class blackbirdParser ( Parser ): def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) - self.checkVersion("4.8") + self.checkVersion("4.9.2") self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._predicates = None @@ -333,6 +333,7 @@ def __init__(self, input:TokenStream, output:TextIO = sys.stdout): class StartContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -423,6 +424,7 @@ def start(self): class MetadatablockContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -570,6 +572,7 @@ def metadatablock(self): class DeclarenameContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -616,6 +619,7 @@ def declarename(self): class ProgramnameContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -656,6 +660,7 @@ def programname(self): class VersionContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -702,6 +707,7 @@ def version(self): class VersionnumberContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -742,6 +748,7 @@ def versionnumber(self): class TargetContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -801,6 +808,7 @@ def target(self): class DeviceContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -850,6 +858,7 @@ def device(self): class DeclaretypeContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -909,6 +918,7 @@ def declaretype(self): class ProgramtypeContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -949,6 +959,7 @@ def programtype(self): class IncludeContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -994,6 +1005,7 @@ def include(self): class ProgramContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1113,6 +1125,7 @@ def program(self): class ExpressionvarContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1187,6 +1200,7 @@ def expressionvar(self): class ArrayvarContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1294,6 +1308,7 @@ def arrayvar(self): class NameContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1350,6 +1365,7 @@ def name(self): class InvalidContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1406,6 +1422,7 @@ def invalid(self): class ReservedContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1461,6 +1478,7 @@ def reserved(self): class VartypeContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1522,6 +1540,7 @@ def vartype(self): class NonnumericContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1571,6 +1590,7 @@ def nonnumeric(self): class ShapeContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1633,6 +1653,7 @@ def shape(self): class ArrayvalContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1705,6 +1726,7 @@ def arrayval(self): class ArrayrowContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1768,6 +1790,7 @@ def arrayrow(self): class StatementContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1904,6 +1927,7 @@ def statement(self): class OperationContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1944,6 +1968,7 @@ def operation(self): class MeasureContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -1984,6 +2009,7 @@ def measure(self): class ForloopContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -2141,6 +2167,7 @@ def forloop(self): class ArgumentsContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -2264,6 +2291,7 @@ def arguments(self): class KwargContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -2348,6 +2376,7 @@ def kwarg(self): class ValContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -2405,6 +2434,7 @@ def val(self): class VallistContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -2468,6 +2498,7 @@ def vallist(self): class RangevalContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -2532,6 +2563,7 @@ def rangeval(self): class ExpressionContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -2953,6 +2985,7 @@ def expression(self, _p:int=0): class ParameterContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -3003,6 +3036,7 @@ def parameter(self): class NumberContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -3058,6 +3092,7 @@ def number(self): class FunctionContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) diff --git a/doc/blackbird_python/installing.rst b/doc/blackbird_python/installing.rst index b5c5905..1b14007 100644 --- a/doc/blackbird_python/installing.rst +++ b/doc/blackbird_python/installing.rst @@ -16,7 +16,7 @@ from GitHub as follows. The Python Blackbird listener requires NumPy and the Pyt .. code-block:: console - $ pip install numpy antlr4-python3-runtime>=4.8 + $ pip install numpy antlr4-python3-runtime==4.9.2 Once this is installed, simply clone the Blackbird git repository, use pip to install: diff --git a/doc/installing.rst b/doc/installing.rst index d3d95af..c6aa031 100644 --- a/doc/installing.rst +++ b/doc/installing.rst @@ -24,14 +24,14 @@ Compiling the grammar already pre-compiled, for both C++ and Python. To compile the grammar, you will need to make sure that Java version 1.6 and higher -is installed. Once Java is installed, use the following steps to install ANTLR 4.8: +is installed. Once Java is installed, use the following steps to install ANTLR 4.9.2: .. code-block:: console $ cd /usr/local/lib - $ sudo wget https://www.antlr.org/download/antlr-4.8-complete.jar - $ export CLASSPATH=".:/usr/local/lib/antlr-4.8-complete.jar:$CLASSPATH" - $ alias antlr4='java -jar /usr/local/lib/antlr-4.8-complete.jar' + $ sudo wget https://www.antlr.org/download/antlr-4.9.2-complete.jar + $ export CLASSPATH=".:/usr/local/lib/antlr-4.9.2-complete.jar:$CLASSPATH" + $ alias antlr4='java -jar /usr/local/lib/antlr-4.9.2-complete.jar' $ alias grun='java org.antlr.v4.gui.TestRig' You can then autogenerate the Python and C++ base listeners and visitors by navigating to the diff --git a/doc/requirements.txt b/doc/requirements.txt index ff2ea3c..c9d1fc9 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,4 +1,4 @@ -antlr4-python3-runtime>=4.7.1 +antlr4-python3-runtime==4.9.2 numpy sphinxcontrib-bibtex<2.0.0 breathe~=4.29.0 diff --git a/requirements.txt b/requirements.txt index 5f8a4c1..d3cc1b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -antlr4-python3-runtime==4.8 +antlr4-python3-runtime==4.9.2 numpy>=1.16 sympy networkx diff --git a/setup.py b/setup.py index b7f300a..ad99d56 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ requirements = [ "numpy>=1.16", "sympy", - "antlr4-python3-runtime==4.8", + "antlr4-python3-runtime==4.9.2", "networkx" ]