Struct end attributes are added to the SmPL and C ASTs. Add a test case
to check allminus for struct end attributes.
Signed-off-by: Jaskaran Singh
---
tests/remove_struct_endattr_allminus.c | 13 +
tests/remove_struct_endattr_allminus.cocci | 6 ++
tests
Struct end attributes are added to the SmPL AST. Reflect these changes
in spgen.
Signed-off-by: Jaskaran Singh
---
tools/spgen/source/position_generator.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/spgen/source/position_generator.ml
b/tools/spgen/source
tort in the type_name
rule
parsing_c: parser: Make abstract_declarator pass attributes
- Reflect changes from the above build error fix.
Jaskaran Singh (14):
parsing_c: parse_c: Ignore TMacroAttr and TMacroEndAttr in passed tokens
parsing_c: parsing_hacks: Label end attributes corr
There is no rule for productions of multiple end attributes. Add a case
similar to that of attribute_list for end attributes.
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/parsing_c/parser_c.mly b/parsing_c
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 23 +--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/parsing_c/parser_c.mly b/parsing_c/parser_c.mly
index d24ab7b8..9afbd68c 100644
--- a/parsing_c/parser_c.mly
+++ b/parsing_c/parser_c.mly
@@ -1667,
atomic_t load_avg __cacheline_aligned;
...
};
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/parsing_c/parser_c.mly b/parsing_c/parser_c.mly
index 9afbd68c..5b7e1faf 100644
and casts
successfully. Some code examples from Linux v5.5-rc4:
kernel/rcu/tree.h:
struct rcu_node {
...
raw_spinlock_t __private lock;
...
};
kernel/sysctl.c:
char __user **buffer = (char __user **)buf;
Signed-off-by
__attribute_name is
an attribute, not a comment.
Signed-off-by: Jaskaran Singh
---
parsing_c/cpp_token_c.ml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/parsing_c/cpp_token_c.ml b/parsing_c/cpp_token_c.ml
index 425234e8..0654be26 100644
--- a/parsing_c/cpp_token_c.ml
+++ b/parsing_c
Add a production for macro declaration end attributes. This parses the
following C code from Linux v5.6-rc7:
arch/x86/kernel/nmi_selftest.c:
static DECLARE_BITMAP(nmi_ipi_mask, NR_CPUS) __initdata;
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 7 ---
1 file changed
OP_SCSI_10 = 0x04,
MYRS_CMD_OP_SCSI_256= 0x05,
MYRS_CMD_OP_IOCTL = 0x20,
} __packed;
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a
ccessfully:
label: attribute;
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/parsing_c/parser_c.mly b/parsing_c/parser_c.mly
index d259f12a..e4352a61 100644
--- a/parsing_c/parser_c.mly
+++ b/parsing_c/pa
ot labeled correctly, leading to C parsing
errors. Add a case to commentize attributes before a storage
qualifier/type qualifier/type correctly.
Signed-off-by: Jaskaran Singh
---
parsing_c/parsing_hacks.ml | 33 +
1 file changed, 33 insertions(+)
diff --git a
A few attribute centric productions cause a lot of duplicate code. Add
an 'end_attributes_opt' rule to dispel duplicate code caused by an
additional attribute centric productions.
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 4
1 file changed, 4 insertions(+)
di
.
Add a case to label multiple end attributes correctly.
Signed-off-by: Jaskaran Singh
---
parsing_c/parsing_hacks.ml | 4
1 file changed, 4 insertions(+)
diff --git a/parsing_c/parsing_hacks.ml b/parsing_c/parsing_hacks.ml
index 0ee0c6c6..74c3ba60 100644
--- a/parsing_c/parsing_hacks.ml
Most cases in parsing_hacks do not consider attributes before or after
the token in question. So, do not pass TMacroAttr or TMacroEndAttr
tokens to parsing_hacks in the before list.
Signed-off-by: Jaskaran Singh
---
parsing_c/parse_c.ml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion
Add a production for a macro call in the cpp_other rule of Coccinelle's
C parser. This parses the following C code from Linux v5.6-rc7
successfully:
arch/x86/kernel/irq_64.c:
DEFINE_PER_CPU_PAGE_ALIGNED(struct irq_stack, irq_stack_backing_store)
__visible;
Signed-off-by: Jas
Apply the MACROANNOTATION hint to select attributes in standard.h. These
hints can be replaced, removed or added by the user as their use case
demands.
Signed-off-by: Jaskaran Singh
---
standard.h | 116 ++---
1 file changed, 58 insertions(+), 58
On Fri, 2020-06-05 at 19:13 +0530, Jaskaran Singh wrote:
> This patch series aims to improve parsing of attributes in C by
> Coccinelle's C parser.
>
> These parsing errors were discovered by running a build of
> Coccinelle's
> master branch on gitlab to parse the s
Cast attributes are added to the SmPL AST. Reflect these changes in
type_annoter_c.ml.
Signed-off-by: Jaskaran Singh
---
Changes in v4:
- Change 't, e, a' to 't, a, e' in the Cast constructor for
consistency
Changes in v3:
Rebase as follows:
v3 of "cocci: Ad
://lore.kernel.org/cocci/20200528122428.4212-1-jaskaransingh7654...@gmail.com/
Jaskaran Singh (4):
parsing_c: parser: Add end_attributes_opt rule
parsing_c: parser: Use end_attributes_opt in decl2
parsing_c: parser: Use end_attributes_opt in field_declaration
parsing_c: parser: Use
A lot of redundant code is introduced in the C parser due to additional
productions for end attributes. Add an end_attributes_opt rule to
resolve this.
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 4
1 file changed, 4 insertions(+)
diff --git a/parsing_c/parser_c.mly b
The decl2 rule has redundant code caused by additional productions for
end attributes. Use end_attributes_opt to resolve this.
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 26 ++
1 file changed, 2 insertions(+), 24 deletions(-)
diff --git a/parsing_c
The field_declaration rule has redundant code caused by additional
productions for end attributes. Use end_attributes_opt to resolve this.
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 32 ++--
1 file changed, 2 insertions(+), 30 deletions(-)
diff --git
The cpp_other rule has redundant code due to an additional production
for end attributes. Use end_attributes_opt to resolve this.
Signed-off-by: Jaskaran Singh
---
parsing_c/parser_c.mly | 34 +-
1 file changed, 1 insertion(+), 33 deletions(-)
diff --git a
The following commit introduced some poor management of attributes in
unify_ast.ml:
b4b8653bd5a9607922e0050fe2fede10d422b218
Apply unify_mcode on macrodecl attributes in unify_ast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unify_ast.ml | 3 ++-
1 file changed, 2 insertions
The following commits introduced some poor management of attributes in
context_neg.ml:
2b7e99a5b86d41e05980c8a9d98eb931e42bb4d8
08f1cd9fb83ec400435e0ad8fdf579ec8f9c0f21
Apply equal_mcode on cast and parameter attributes in context_neg.ml.
Signed-off-by: Jaskaran Singh
The following commits introduced some poor management of attributes in
arity.ml:
08f1cd9fb83ec400435e0ad8fdf579ec8f9c0f21
b4b8653bd5a9607922e0050fe2fede10d422b218
Apply mcode2arity to macrodecl and parameter attributes.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/arity.ml
/20200529120703.31145-1-jaskaransingh7654...@gmail.com
[3]
[PATCH 00/30] cocci: Add macrodecl attributes to C and SmPL ASTs
https://lore.kernel.org/cocci/20200524171935.2504-1-jaskaransingh7654...@gmail.com
Jaskaran Singh (3):
parsing_cocci: arity: Apply mcode2arity on macrodecl/param attrs
Hi Markus,
I'm away from my computer right now so can't test this, but try declaring
__iomem as an attribute:
@display@
identifier action;
attribute name __iomem;
@@
On Tue, 16 Jun 2020, 10:21 p.m. Markus Elfring Hello,
>
> The support for data processing with attributes was extended recently.
On Wed, 2020-06-17 at 09:30 +0200, Markus Elfring wrote:
> > I'm away from my computer right now so can't test this, but try
> > declaring __iomem as an attribute:
>
> @display@
> attribute name __iomem;
> identifier action;
> @@
> *void __iomem * action(...)
> { ... }
>
>
> elfring@Sonne:~/Pro
This patch series aims to wrap the existing attribute type on the SmPL
side. Wrapping attributes is necessary to add support for meta
attributes in SmPL.
Jaskaran Singh (20):
parsing_cocci: ast0_cocci: Wrap SmPL Attributes
parsing_cocci: parser: Wrap SmPL Attributes
Attributes are wrapped in the SmPL AST. Reflect these changes in
unparse_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_c/unparse_cocci.ml | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/parsing_c/unparse_cocci.ml b/parsing_c
Attributes are wrapped in the SmPL AST. Reflect these changes in
iso_pattern.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/iso_pattern.ml | 68 ++--
1 file changed, 27 insertions(+), 41 deletions(-)
diff --git a/parsing_cocci/iso_pattern.ml b/parsing_cocci
Attributes are wrapped in the SmPL AST. Reflect these changes in
unify_ast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unify_ast.ml | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/parsing_cocci/unify_ast.ml b/parsing_cocci/unify_ast.ml
index
Attributes are wrapped in the SmPL AST. Reflect these changes in
cocci_vs_c.ml.
Signed-off-by: Jaskaran Singh
---
engine/cocci_vs_c.ml | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/engine/cocci_vs_c.ml b/engine/cocci_vs_c.ml
index 7abc4d53..3199d54d 100644
Attributes are wrapped in the SmPL AST. Reflect these changes in
adjust_pragmas.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/adjust_pragmas.ml | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/parsing_cocci/adjust_pragmas.ml b/parsing_cocci/adjust_pragmas.ml
SmPL attributes need to be wrapped to provide support for meta
attributes. Wrap attributes in the SmPL AST.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast_cocci.ml | 5 -
parsing_cocci/ast_cocci.mli | 5 -
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a
Attributes are wrapped in the SmPL AST. Reciprocate this and wrap
attributes in the SmPL parser.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/parse_aux.ml| 3 +++
parsing_cocci/parse_aux.mli | 7 +++
parsing_cocci/parser_cocci_menhir.mly | 18 ++
3
Attributes are wrapped in the SmPL AST. Reflect these changes in
coccilib.mli.
Signed-off-by: Jaskaran Singh
---
ocaml/coccilib.mli | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ocaml/coccilib.mli b/ocaml/coccilib.mli
index 24b5f1ae..010b8aab 100644
--- a/ocaml
Attributes are wrapped in the SmPL AST. Reflect these changes in
compute_lines.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/compute_lines.ml | 42 +++---
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/parsing_cocci/compute_lines.ml b
Attributes are wrapped in the SmPL AST. Create a function for attributes
in the SmPL AST visitor. This function has not been added to the
visitor API yet.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast.ml | 48 +++-
1 file changed, 31 insertions
Attributes are wrapped in the SmPL AST. Create a function for attributes
in the SmPL AST0 visitor. This function has not been added to the
visitor API yet.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast0.ml | 27 ++-
1 file changed, 18 insertions(+), 9
Attributes are wrapped in the SmPL AST. Reflect these changes in
ast0toast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast0toast.ml | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/parsing_cocci/ast0toast.ml b/parsing_cocci/ast0toast.ml
index
Attributes are wrapped in the SmPL AST. Reflect these changes in
context_neg.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/context_neg.ml | 31 ---
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/parsing_cocci/context_neg.ml b/parsing_cocci
Attributes are wrapped in the SmPL AST. Reflect these changes in
get_constants2.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/get_constants2.ml | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/get_constants2.ml b/parsing_cocci/get_constants2.ml
index
Attributes are wrapped in the SmPL AST. Reflect these changes in
arity.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/arity.ml | 67 +++---
1 file changed, 31 insertions(+), 36 deletions(-)
diff --git a/parsing_cocci/arity.ml b/parsing_cocci/arity.ml
Attributes are wrapped in the SmPL AST. Reflect these changes in
safe_for_multi_decls.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/safe_for_multi_decls.ml | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/safe_for_multi_decls.ml
b/parsing_cocci
Attributes are wrapped in the SmPL AST. Assign the Attribute variant an
index.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/index.ml | 6 +-
parsing_cocci/index.mli | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/index.ml b/parsing_cocci/index.ml
index
SmPL attributes need to be wrapped to provide support for meta
attributes. Wrap attributes in AST0 of SmPL.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast0_cocci.ml | 5 -
parsing_cocci/ast0_cocci.mli | 5 -
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a
Attributes are wrapped in the SmPL AST. Reflect these changes in
pretty_print_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/pretty_print_cocci.ml | 34 ++---
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/parsing_cocci/pretty_print_cocci.ml
Attributes are wrapped in the SmPL AST. Reflect these changes in
unparse_ast0.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unparse_ast0.ml | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/parsing_cocci/unparse_ast0.ml b
On Mon, 2020-07-06 at 22:03 +0200, Julia Lawall wrote:
>
> On Fri, 3 Jul 2020, Jaskaran Singh wrote:
>
> > Attributes are wrapped in the SmPL AST. Reciprocate this and wrap
> > attributes in the SmPL parser.
>
> This doesn't apply for me.
>
Ah, I missed the
Attributes are wrapped in the SmPL AST. Reflect these changes in
cocci_vs_c.ml.
Signed-off-by: Jaskaran Singh
---
engine/cocci_vs_c.ml | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/engine/cocci_vs_c.ml b/engine/cocci_vs_c.ml
index 7abc4d53..3199d54d 100644
Attributes are wrapped in the SmPL AST. Reflect these changes in
unify_ast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unify_ast.ml | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/parsing_cocci/unify_ast.ml b/parsing_cocci/unify_ast.ml
index
SmPL attributes need to be wrapped to provide support for meta
attributes. Wrap attributes in AST0 of SmPL.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast0_cocci.ml | 5 -
parsing_cocci/ast0_cocci.mli | 5 -
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a
Attributes are wrapped in the SmPL AST. Create a function for attributes
in the SmPL AST0 visitor. This function has not been added to the
visitor API yet.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast0.ml | 27 ++-
1 file changed, 18 insertions(+), 9
Attributes are wrapped in the SmPL AST. Reflect these changes in
arity.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/arity.ml | 67 +++---
1 file changed, 31 insertions(+), 36 deletions(-)
diff --git a/parsing_cocci/arity.ml b/parsing_cocci/arity.ml
Attributes are wrapped in the SmPL AST. Reflect these changes in
compute_lines.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/compute_lines.ml | 42 +++---
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/parsing_cocci/compute_lines.ml b
Attributes are wrapped in the SmPL AST. Reflect these changes in
adjust_pragmas.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/adjust_pragmas.ml | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/parsing_cocci/adjust_pragmas.ml b/parsing_cocci/adjust_pragmas.ml
Attributes are wrapped in the SmPL AST. Assign the Attribute variant an
index.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/index.ml | 6 +-
parsing_cocci/index.mli | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/index.ml b/parsing_cocci/index.ml
index
Attributes are wrapped in the SmPL AST. Reflect these changes in
unparse_ast0.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unparse_ast0.ml | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/parsing_cocci/unparse_ast0.ml b
Attributes are wrapped in the SmPL AST. Reflect these changes in
pretty_print_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/pretty_print_cocci.ml | 34 ++---
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/parsing_cocci/pretty_print_cocci.ml
Attributes are wrapped in the SmPL AST. Reflect these changes in
unparse_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_c/unparse_cocci.ml | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/parsing_c/unparse_cocci.ml b/parsing_c
SmPL attributes need to be wrapped to provide support for meta
attributes. Wrap attributes in the SmPL AST.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast_cocci.ml | 5 -
parsing_cocci/ast_cocci.mli | 5 -
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a
Attributes are wrapped in the SmPL AST. Reciprocate this and wrap
attributes in the SmPL parser.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/parse_aux.ml| 3 +++
parsing_cocci/parse_aux.mli | 7 +++
parsing_cocci/parser_cocci_menhir.mly | 18 ++
3
Attributes are wrapped in the SmPL AST. Reflect these changes in
context_neg.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/context_neg.ml | 31 ---
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/parsing_cocci/context_neg.ml b/parsing_cocci
Attributes are wrapped in the SmPL AST. Reflect these changes in
ast0toast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast0toast.ml | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/parsing_cocci/ast0toast.ml b/parsing_cocci/ast0toast.ml
index
Attributes are wrapped in the SmPL AST. Create a function for attributes
in the SmPL AST visitor. This function has not been added to the
visitor API yet.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast.ml | 48 +++-
1 file changed, 31 insertions
Attributes are wrapped in the SmPL AST. Reflect these changes in
coccilib.mli.
Signed-off-by: Jaskaran Singh
---
ocaml/coccilib.mli | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ocaml/coccilib.mli b/ocaml/coccilib.mli
index 24b5f1ae..010b8aab 100644
--- a/ocaml
Attributes are wrapped in the SmPL AST. Reflect these changes in
safe_for_multi_decls.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/safe_for_multi_decls.ml | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/safe_for_multi_decls.ml
b/parsing_cocci
Attributes are wrapped in the SmPL AST. Reflect these changes in
iso_pattern.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/iso_pattern.ml | 68 ++--
1 file changed, 27 insertions(+), 41 deletions(-)
diff --git a/parsing_cocci/iso_pattern.ml b/parsing_cocci
Attributes are wrapped in the SmPL AST. Reflect these changes in
get_constants2.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/get_constants2.ml | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/get_constants2.ml b/parsing_cocci/get_constants2.ml
index
matching regexps
parsing_cocci: arity: Wrap SmPL Attributes
- Use literal tab wherever suitable
- Fix space-before-tab errors
Jaskaran Singh (20):
parsing_cocci: ast0_cocci: Wrap SmPL Attributes
parsing_cocci: parser: Wrap SmPL Attributes
parsing_cocci: visitor_ast0: Wrap SmPL
On Wed, 2020-07-08 at 18:23 +0530, Jaskaran Singh wrote:
> This patch series aims to wrap the existing attribute type on the
> SmPL
> side. Wrapping attributes is necessary to add support for meta
> attributes in SmPL.
>
Whoops, this is the wrong version. Let me send this again.
SmPL attributes need to be wrapped to provide support for meta
attributes. Wrap attributes in AST0 of SmPL.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast0_cocci.ml | 5 -
parsing_cocci/ast0_cocci.mli | 5 -
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a
Attributes are wrapped in the SmPL AST. Reflect these changes in
compute_lines.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/compute_lines.ml | 42 +++---
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/parsing_cocci/compute_lines.ml b
Attributes are wrapped in the SmPL AST. Reflect these changes in
adjust_pragmas.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/adjust_pragmas.ml | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/parsing_cocci/adjust_pragmas.ml b/parsing_cocci/adjust_pragmas.ml
Attributes are wrapped in the SmPL AST. Create a function for attributes
in the SmPL AST visitor. This function has not been added to the
visitor API yet.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast.ml | 48 +++-
1 file changed, 31 insertions
Attributes are wrapped in the SmPL AST. Reflect these changes in
ast0toast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast0toast.ml | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/parsing_cocci/ast0toast.ml b/parsing_cocci/ast0toast.ml
index
Attributes are wrapped in the SmPL AST. Reflect these changes in
iso_pattern.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/iso_pattern.ml | 68 ++--
1 file changed, 27 insertions(+), 41 deletions(-)
diff --git a/parsing_cocci/iso_pattern.ml b/parsing_cocci
matching regexps
parsing_cocci: arity: Wrap SmPL Attributes
- Use literal tab wherever suitable
- Fix space-before-tab errors
Jaskaran Singh (20):
parsing_cocci: ast0_cocci: Wrap SmPL Attributes
parsing_cocci: parser: Wrap SmPL Attributes
parsing_cocci: visitor_ast0: Wrap SmPL
Attributes are wrapped in the SmPL AST. Reflect these changes in
context_neg.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/context_neg.ml | 31 ---
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/parsing_cocci/context_neg.ml b/parsing_cocci
SmPL attributes need to be wrapped to provide support for meta
attributes. Wrap attributes in the SmPL AST.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast_cocci.ml | 5 -
parsing_cocci/ast_cocci.mli | 5 -
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a
Attributes are wrapped in the SmPL AST. Reflect these changes in
get_constants2.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/get_constants2.ml | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/get_constants2.ml b/parsing_cocci/get_constants2.ml
index
Attributes are wrapped in the SmPL AST. Reciprocate this and wrap
attributes in the SmPL parser.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/parse_aux.ml| 3 +++
parsing_cocci/parse_aux.mli | 7 +++
parsing_cocci/parser_cocci_menhir.mly | 18 ++
3
Attributes are wrapped in the SmPL AST. Reflect these changes in
pretty_print_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/pretty_print_cocci.ml | 34 ++---
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/parsing_cocci/pretty_print_cocci.ml
Attributes are wrapped in the SmPL AST. Reflect these changes in
unparse_ast0.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unparse_ast0.ml | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/parsing_cocci/unparse_ast0.ml b
Attributes are wrapped in the SmPL AST. Reflect these changes in
cocci_vs_c.ml.
Signed-off-by: Jaskaran Singh
---
engine/cocci_vs_c.ml | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/engine/cocci_vs_c.ml b/engine/cocci_vs_c.ml
index 704c18e0..9439cdb3 100644
Attributes are wrapped in the SmPL AST. Reflect these changes in
safe_for_multi_decls.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/safe_for_multi_decls.ml | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/safe_for_multi_decls.ml
b/parsing_cocci
Attributes are wrapped in the SmPL AST. Reflect these changes in
arity.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/arity.ml | 55 +++---
1 file changed, 25 insertions(+), 30 deletions(-)
diff --git a/parsing_cocci/arity.ml b/parsing_cocci/arity.ml
Attributes are wrapped in the SmPL AST. Reflect these changes in
unify_ast.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unify_ast.ml | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/parsing_cocci/unify_ast.ml b/parsing_cocci/unify_ast.ml
index
Attributes are wrapped in the SmPL AST. Reflect these changes in
unparse_cocci.ml.
Signed-off-by: Jaskaran Singh
---
parsing_c/unparse_cocci.ml | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/parsing_c/unparse_cocci.ml b/parsing_c
Attributes are wrapped in the SmPL AST. Reflect these changes in
coccilib.mli.
Signed-off-by: Jaskaran Singh
---
ocaml/coccilib.mli | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ocaml/coccilib.mli b/ocaml/coccilib.mli
index 24b5f1ae..010b8aab 100644
--- a/ocaml
Attributes are wrapped in the SmPL AST. Create a function for attributes
in the SmPL AST0 visitor. This function has not been added to the
visitor API yet.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/visitor_ast0.ml | 27 ++-
1 file changed, 18 insertions(+), 9
Attributes are wrapped in the SmPL AST. Assign the Attribute variant an
index.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/index.ml | 6 +-
parsing_cocci/index.mli | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/parsing_cocci/index.ml b/parsing_cocci/index.ml
index
Add more tokens (binary operators and colon) to the match ladder in
is_permissible_proto. These cases would otherwise cause parsing errors
for function calls after these tokens.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/parse_cocci.ml | 19 ++-
1 file changed, 18
On Sat, 2020-07-11 at 09:57 +0200, Julia Lawall wrote:
>
> On Sat, 11 Jul 2020, Jaskaran Singh wrote:
>
> > Add more tokens (binary operators and colon) to the match ladder in
> > is_permissible_proto. These cases would otherwise cause parsing
> > errors
> > for
Add the AttributeTag constructor to AST0 of SmPL.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/ast0_cocci.ml | 2 ++
parsing_cocci/ast0_cocci.mli | 1 +
2 files changed, 3 insertions(+)
diff --git a/parsing_cocci/ast0_cocci.ml b/parsing_cocci/ast0_cocci.ml
index bfc0d145..d7d81001 100644
AttributeTag is added to SmPL AST0. Reflect these changes in
unparse_ast0.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unparse_ast0.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/parsing_cocci/unparse_ast0.ml b/parsing_cocci/unparse_ast0.ml
index 109f1844..875282fb 100644
--- a
The SmPL AST0 visitor has a function for attributes. Reflect these
changes in unitary_ast0.ml.
Signed-off-by: Jaskaran Singh
---
parsing_cocci/unitary_ast0.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parsing_cocci/unitary_ast0.ml b/parsing_cocci/unitary_ast0.ml
index
401 - 500 of 598 matches
Mail list logo