-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2925fc6
commit ef7a798
Showing
5 changed files
with
83 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
pySART - Simplified AUTOSAR-Toolkit for Python. | ||
(C) 2009-2022 by Christoph Schueler <[email protected]> | ||
(C) 2009-2024 by Christoph Schueler <[email protected]> | ||
All Rights Reserved | ||
|
@@ -33,22 +33,20 @@ amlFile: | |
; | ||
|
||
declaration: | ||
( t = type_definition | ||
| b = block_definition) ';' | ||
( t = type_definition ';') | ||
| (b = block_definition ';') | ||
; | ||
|
||
type_definition: | ||
type_name | ||
; | ||
|
||
type_name: | ||
t = tagValue? ( | ||
pr = predefined_type_name | ||
| st = struct_type_name | ||
| ts = taggedstruct_type_name | ||
| tu = taggedunion_type_name | ||
| en = enum_type_name | ||
) | ||
; | ||
|
||
predefined_type_name: | ||
|
@@ -67,9 +65,8 @@ predefined_type_name: | |
; | ||
|
||
block_definition: | ||
'block' tag = tagValue | ||
tn = type_name | ||
| (/* Owed to Vector Informatik... */ '(' mem = member ')' (mult = '*')?) | ||
//block_definition | 'block' tag = tagValue tn = type_name | ||
'block' tag = tagValue (blk = block_definition | tn = type_name) | ||
; | ||
|
||
enum_type_name: | ||
|
@@ -91,8 +88,7 @@ struct_type_name: | |
; | ||
|
||
struct_member: | ||
m = member ';' | ||
| '(' mstar = member ')' (m0 = '*')? ';' | ||
m = member | block_definition ';' | ||
; | ||
|
||
member: | ||
|
@@ -104,32 +100,30 @@ array_specifier: | |
; | ||
|
||
taggedstruct_type_name: | ||
'taggedstruct' t1 = identifierValue | ||
| 'taggedstruct' t0 = identifierValue? ('{' (l += taggedstruct_member)* '}' | (l += taggedstruct_member)*) | ||
'taggedstruct' t0 = identifierValue? '{' (l += taggedstruct_member)* '}' | ||
| 'taggedstruct' t1 = identifierValue | ||
; | ||
|
||
taggedstruct_member: | ||
('(' ts0 = taggedstruct_definition ';'? ')' '*' ';') | ||
| ('(' bl0 = block_definition ')' '*' ';') | ||
| (ts1 = taggedstruct_definition ';') | ||
| (bl1 = block_definition ';') | ||
; | ||
ts1 = taggedstruct_definition ';' | ||
| '(' ts0 = taggedstruct_definition ')' '*' ';' | ||
| bl1 = block_definition ';' | ||
| '(' bl0 = block_definition ')' '*' ';' | ||
; | ||
|
||
taggedstruct_definition: | ||
tag = tagValue? mem = member? | ||
| tag = tagValue? '(' mem = member ')' '*' | ||
; | ||
tag = tagValue mem = member? | ||
| tag = tagValue '(' mem = member ';'? ')' '*' // ';' | ||
; | ||
|
||
taggedunion_type_name: | ||
(('taggedunion' t0 = identifierValue? '{' l += tagged_union_member* '}') | ||
| ('taggedunion' t1 = identifierValue)) | ||
'taggedunion' t0 = identifierValue? '{' l += tagged_union_member* '}' | ||
| 'taggedunion' t1 = identifierValue | ||
; | ||
|
||
tagged_union_member: | ||
( | ||
t = tagValue m = member? ';' | ||
t = tagValue m = member? ';' | ||
| b = block_definition ';' | ||
) | ||
; | ||
|
||
numericValue: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.