5544
|
|
|
Julia Lawall |
1 year ago
|
![Diff](/static/images/ico_diff.gif) |
|
5387
|
|
|
Julia Lawall |
1 year ago
|
![Diff](/static/images/ico_diff.gif) |
|
5385
|
|
|
Julia Lawall |
1 year ago
|
![Diff](/static/images/ico_diff.gif) |
|
5124
|
|
|
Julia Lawall |
2 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
5123
|
|
|
Julia Lawall |
2 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
5122
|
|
|
Julia Lawall |
2 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
5091
|
|
|
Thierry Martinez |
3 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
5078
|
|
|
Julia Lawall |
3 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4992
|
|
|
Keisuke Nishimura |
3 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4924
|
|
|
Jaskaran Singh |
4 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4861
|
|
1. parsing_cocci: Align C AST and SmPL AST for enum
The C AST and SmPL AST differs with respect to the enum type.
For an enumerator, the C AST is as follows: Enum -> list of (name, (info, expression))
For the same, the SmPL AST is as follows: EnumDef -> list of expression
While the SmPL parser does make sure that enumerators are parsed as per C rules, the OCaml types for an enumerator themselves mismatch, due to their organization. This causes bugs/mismatches for cases where enums are in disjunctions.
Make the enumerator type of the SmPL AST closer to that of the C AST.
2. ocaml: coccilib: Reflect changes in SmPL AST for EnumDef
The EnumDef constructor is changed in the SmPL AST. Reflect these changes in coccilib.
3. parsing_cocci: parser: Parse enumerators correctly
The EnumDef constructor of the SmPL AST has changed. Make the SmPL parser parse an EnumDef correctly.
4. parsing_cocci: Add EnumDeclTag and EnumDeclDotsTag to SmPL ASTs
These constructors are needed by the visitor and various other functions in the codebase. Maintain consistency and add these constructs w/r/t changes in the SmPL AST.
5. ocaml: coccilib: Reflect EnumDeclTag and EnumDeclDotsTag
The SmPL AST now has these constructors. Reflect these changes in coccilib.
6. parsing_cocci: visitor_ast0: Add visitor functions for enum_decl
An enumerator in the SmPL AST now has the enum_decl type. Add corresponding functions for the combiner, combiner_rebuilder and rebuilder in Visitor_ast0.
7. parsing_cocci: Reflect visitor_ast0 changes in parsing_cocci
The SmPL AST0 visitor has functions for handling enumerators separately. Handle these collateral evolutions in parsing_cocci by creating visitor functions for enum and enumdots in various places, as well as adding the additional arguments needed in the visitor combiners and rebuilders.
8. parsing_cocci: Add visitor functions for enum_decl in visitor_ast
An enumerator in the SmPL AST now has the enum_decl type. Add corresponding functions for the combiner, combiner_rebuilder and rebuilder in Visitor_ast.
9. cocci: Reflect changes in SmPL visitor_ast in codebase
The SmPL AST visitor has functions for handling enumerators separately. Handle these collateral evolutions in the codebase by creating visitor functions for enum and enumdots in various places, as well as adding the additional arguments needed in the visitor combiners and rebuilders.
10. engine: cocci_vs_c: Match enumerators properly as per enum_decl
The SmPL AST has a separate enum_decl type for an enumerator. Make corresponding changes in Cocci_vs_c to correctly match enumerators.
11. cocci: pretty print EnumDef as per enum_decl type
The SmPL AST has a separate enum_decl for a enumerator. Make corresponding changes in Unparse_cocci and Pretty_print_cocci to correctly pretty print enumerators.
12. tests: Add test case for assigned enumerator
Add a test case to verify correct pretty printing of enumerators that are assigned. The test case should cover minused assigned enumerators, plussed assigned enumerators and correct matching of an enum with an assigned enumerator.
13. tools: spgen: Reflect visitor changes
Visitor_ast0 has changes with respect to enums. Reflect these changes in spgen by adding additional arguments in the combiners and rebuilders.
Signed-off-by: Jaskaran Singh <jaskaransingh7654321@gmail.com> Reviewed-by: Julia Lawall <Julia.Lawall@inria.fr>
|
Jaskaran Singh |
4 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4774
|
|
|
JPR |
5 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4773
|
|
|
Julia Lawall |
5 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4690
|
|
|
Julia Lawall |
6 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4670
|
|
|
Julia Lawall |
6 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4657
|
|
|
julia |
6 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4634
|
|
|
Julia Lawall |
6 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4618
|
|
|
Julia Lawall |
6 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4617
|
|
|
Julia Lawall |
6 years ago
|
![Diff](/static/images/ico_diff.gif) |
|
4590
|
|
|
Thierry Martinez |
7 years ago
|
![Diff](/static/images/ico_diff.gif) |
|