Coccinelle archive on lore.kernel.org
 help / color / Atom feed
* Re: [Cocci] [PATCH 04/13] parsing_cocci: Add EnumDeclTag and EnumDeclDotsTag to SmPL ASTs
@ 2020-03-09 11:41 Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2020-03-09 11:41 UTC (permalink / raw)
  To: Jaskaran Singh, cocci; +Cc: linux-kernel-mentees

> constructs w/r/t changes in the SmPL AST.

Would an other change description be more helpful?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Cocci] [PATCH 04/13] parsing_cocci: Add EnumDeclTag and EnumDeclDotsTag to SmPL ASTs
  2020-03-08  8:43 [Cocci] [PATCH 00/13] cocci: Align the C AST and SmPL AST for enum Jaskaran Singh
@ 2020-03-08  8:43 ` Jaskaran Singh
  0 siblings, 0 replies; 2+ messages in thread
From: Jaskaran Singh @ 2020-03-08  8:43 UTC (permalink / raw)
  To: cocci; +Cc: linux-kernel-mentees

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.

Signed-off-by: Jaskaran Singh <jaskaransingh7654321@gmail.com>
---
 parsing_cocci/ast0_cocci.ml  | 4 ++++
 parsing_cocci/ast0_cocci.mli | 4 ++++
 parsing_cocci/ast_cocci.ml   | 4 ++++
 parsing_cocci/ast_cocci.mli  | 2 ++
 4 files changed, 14 insertions(+)

diff --git a/parsing_cocci/ast0_cocci.ml b/parsing_cocci/ast0_cocci.ml
index b3d8b137..70486e4c 100644
--- a/parsing_cocci/ast0_cocci.ml
+++ b/parsing_cocci/ast0_cocci.ml
@@ -553,6 +553,7 @@ and anything =
   | DotsStmtTag of statement dots
   | DotsDeclTag of declaration dots
   | DotsFieldTag of field dots
+  | DotsEnumDeclTag of enum_decl dots
   | DotsCaseTag of case_line dots
   | DotsDefParamTag of define_param dots
   | IdentTag of ident
@@ -566,6 +567,7 @@ and anything =
   | InitTag of initialiser
   | DeclTag of declaration
   | FieldTag of field
+  | EnumDeclTag of enum_decl
   | StmtTag of statement
   | ForInfoTag of forinfo
   | CaseLineTag of case_line
@@ -585,6 +587,7 @@ let dotsInit x = DotsInitTag x
 let dotsStmt x = DotsStmtTag x
 let dotsDecl x = DotsDeclTag x
 let dotsField x = DotsFieldTag x
+let dotsEnumDecl x = DotsEnumDeclTag x
 let dotsCase x = DotsCaseTag x
 let dotsDefParam x = DotsDefParamTag x
 let ident x = IdentTag x
@@ -601,6 +604,7 @@ let forinfo x = ForInfoTag x
 let case_line x = CaseLineTag x
 let string_fragment x = StringFragmentTag x
 let top x = TopTag x
+let enum_decl x = EnumDeclTag x
 
 (* --------------------------------------------------------------------- *)
 (* Avoid cluttering the parser.  Calculated in compute_lines.ml. *)
diff --git a/parsing_cocci/ast0_cocci.mli b/parsing_cocci/ast0_cocci.mli
index 732a1345..7b2a87c4 100644
--- a/parsing_cocci/ast0_cocci.mli
+++ b/parsing_cocci/ast0_cocci.mli
@@ -542,6 +542,7 @@ and anything =
   | DotsStmtTag of statement dots
   | DotsDeclTag of declaration dots
   | DotsFieldTag of field dots
+  | DotsEnumDeclTag of enum_decl dots
   | DotsCaseTag of case_line dots
   | DotsDefParamTag of define_param dots
   | IdentTag of ident
@@ -555,6 +556,7 @@ and anything =
   | InitTag of initialiser
   | DeclTag of declaration
   | FieldTag of field
+  | EnumDeclTag of enum_decl
   | StmtTag of statement
   | ForInfoTag of forinfo
   | CaseLineTag of case_line
@@ -574,6 +576,7 @@ val dotsParam : parameterTypeDef dots -> anything
 val dotsStmt : statement dots -> anything
 val dotsDecl : declaration dots -> anything
 val dotsField : field dots -> anything
+val dotsEnumDecl : enum_decl dots -> anything
 val dotsCase : case_line dots -> anything
 val dotsDefParam : define_param dots -> anything
 val ident : ident -> anything
@@ -585,6 +588,7 @@ val param : parameterTypeDef -> anything
 val ini : initialiser -> anything
 val decl : declaration -> anything
 val field : field -> anything
+val enum_decl : enum_decl -> anything
 val stmt : statement -> anything
 val forinfo : forinfo -> anything
 val case_line : case_line -> anything
diff --git a/parsing_cocci/ast_cocci.ml b/parsing_cocci/ast_cocci.ml
index 8fa64dcc..27942992 100644
--- a/parsing_cocci/ast_cocci.ml
+++ b/parsing_cocci/ast_cocci.ml
@@ -790,6 +790,7 @@ and anything =
   | LogicalOpTag        of logicalOp
   | DeclarationTag      of declaration
   | FieldTag            of field
+  | EnumDeclTag         of enum_decl
   | InitTag             of initialiser
   | StorageTag          of storage
   | IncFileTag          of inc_file
@@ -807,6 +808,7 @@ and anything =
   | StmtDotsTag         of statement dots
   | AnnDeclDotsTag      of annotated_decl dots
   | AnnFieldDotsTag     of annotated_field dots
+  | EnumDeclDotsTag     of enum_decl dots
   | DefParDotsTag       of define_param dots
   | TypeCTag            of typeC
   | ParamTag            of parameterTypeDef
@@ -932,6 +934,7 @@ and tag2c = function
   | LogicalOpTag _ -> "LogicalOpTag"
   | DeclarationTag _ -> "DeclarationTag"
   | FieldTag _ -> "FieldTag"
+  | EnumDeclTag _ -> "EnumDeclTag"
   | InitTag _      -> "InitTag"
   | StorageTag _   -> "StorageTag"
   | IncFileTag _   -> "IncFileTag"
@@ -949,6 +952,7 @@ and tag2c = function
   | StmtDotsTag _ -> "StmtDotsTag"
   | AnnDeclDotsTag _ -> "AnnDeclDotsTag"
   | AnnFieldDotsTag _ -> "AnnFieldDotsTag"
+  | EnumDeclDotsTag _ -> "EnumDeclDotsTag"
   | DefParDotsTag _ -> "DefParDotsTag"
   | TypeCTag _ -> "TypeCTag"
   | ParamTag _ -> "ParamTag"
diff --git a/parsing_cocci/ast_cocci.mli b/parsing_cocci/ast_cocci.mli
index e921f917..8316a427 100644
--- a/parsing_cocci/ast_cocci.mli
+++ b/parsing_cocci/ast_cocci.mli
@@ -759,6 +759,7 @@ and anything =
   | LogicalOpTag        of logicalOp
   | DeclarationTag      of declaration
   | FieldTag            of field
+  | EnumDeclTag         of enum_decl
   | InitTag             of initialiser
   | StorageTag          of storage
   | IncFileTag          of inc_file
@@ -776,6 +777,7 @@ and anything =
   | StmtDotsTag         of statement dots
   | AnnDeclDotsTag      of annotated_decl dots
   | AnnFieldDotsTag     of annotated_field dots
+  | EnumDeclDotsTag     of enum_decl dots
   | DefParDotsTag       of define_param dots
   | TypeCTag            of typeC
   | ParamTag            of parameterTypeDef
-- 
2.21.1

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09 11:41 [Cocci] [PATCH 04/13] parsing_cocci: Add EnumDeclTag and EnumDeclDotsTag to SmPL ASTs Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2020-03-08  8:43 [Cocci] [PATCH 00/13] cocci: Align the C AST and SmPL AST for enum Jaskaran Singh
2020-03-08  8:43 ` [Cocci] [PATCH 04/13] parsing_cocci: Add EnumDeclTag and EnumDeclDotsTag to SmPL ASTs Jaskaran Singh

Coccinelle archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cocci/0 cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ https://lore.kernel.org/cocci \
		cocci@systeme.lip6.fr
	public-inbox-index cocci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/fr.lip6.systeme.cocci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git