passlab / ompparser

ompparser: A Standalone and Unified OpenMP Parser
https://github.com/passlab/ompparser
Other
5 stars 1 forks source link

Obtaining plain directive without user symbols #71

Open simoatze opened 5 years ago

simoatze commented 5 years ago

Hi guys,

first of all, this is a great tool! I started playing with it and I was wondering if there a way to obtain the plain parsed directive without the symbols (e.g. variables, etc.) I am not an expert on parsing, so it could be something not doable, but let me give you an example. Let's say I parse this directive:

#pragma omp target data map ( tofrom : a[0:ARRAY_SIZE], num_teams) map ( to : b[0:ARRAY_SIZE])

I would like to obtain something generic like this:

#pragma omp target data map ( tofrom : ) map ( to : )

or even a format like the grammar specified in the spec:

#pragma omp target [clause[ [,] clause] ... ] new-line

Thanks a lot, and great work with the ompparser! Simone

yanyh15 commented 5 years ago

Thank you for your interest.

It is pretty easy to do, because the way we process variables and expressions. I will be asking one of the developer to look into this. We just need a on/off flag for this feature.

Yonghong

yanyh15 commented 4 years ago

Create a new branch for the implementation.