Skip to content

Commit

Permalink
Extend grammar by variable type representation
Browse files Browse the repository at this point in the history
- Add definition for variable type
- Apply changes to tree visitor
- Adjust tests
  • Loading branch information
OliverStolzBO committed Apr 15, 2024
1 parent 73f0fb8 commit 61e57a9
Show file tree
Hide file tree
Showing 5 changed files with 627 additions and 540 deletions.
6 changes: 4 additions & 2 deletions pfdl_grammar/PFDLParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ struct_initialization:
| STARTS_WITH_UPPER_C_STR NL* json_object NL*;

variable_definition:
STARTS_WITH_LOWER_C_STR COLON primitive array?;
STARTS_WITH_LOWER_C_STR COLON variable_type;

variable_type: primitive array?;

primitive:
NUMBER_P
Expand Down Expand Up @@ -137,4 +139,4 @@ json_value:

json_array
: JSON_ARRAY_LEFT json_value (JSON_COMMA json_value)* JSON_ARRAY_RIGHT
| JSON_ARRAY_LEFT JSON_ARRAY_RIGHT;
| JSON_ARRAY_LEFT JSON_ARRAY_RIGHT;
Loading

0 comments on commit 61e57a9

Please sign in to comment.