Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

[Tool Proposal] New command parac analyse for Pre-Processor and Syntax Analysis in one #16

Open
1 task done
Luna-Klatzer opened this issue Jul 22, 2021 · 0 comments
Open
1 task done
Assignees
Labels
cli CLI issue, change or idea enhancement New feature or request

Comments

@Luna-Klatzer
Copy link
Member

Luna-Klatzer commented Jul 22, 2021

This issue partly bases on the closed issue #9, which proposed the implementation of an additional handler in parac syntax-check, which should handle comments and remove them to avoid having to deal with them in the Antlr4 grammar files. (This issue is resolved and a comment-removal step was added)

Summary:
Addition of a new command parac analyse, which would combine the syntax-check command with the Pre-Processor. This would mean that the command would process the directives as well and generate the Para-C source code itself. This would mean the checked source code, in the end, would be the processed version of the original source code.

This could provide nicer checking, especially if certain macros should be checked if they work properly in certain cases. This also would avoid having to compile the program unnecessarily or implement in-code debug statements.

Notes:

  1. This would require that command line macros would need to passed as well so that they can be processed without any issue.
  2. Include directives would then also be processed, meaning the check would do a proper check of all files, so it can be compared to an actual code analyser command.
  3. Additional syntax or logic warnings could also be included in the command, so that the analyse command can be used as a proper logical check. This will be limited though to basic checking for now.
  4. Simple Explanation of the difference between parac syntax-check and parac analyse. Syntax-Check will completely ignore Pre-Processor directives and handle it as if it was a file where all directives were invisible. Analyse will handle the preprocessor directives, meaning the command line directives will have to be passed as well. (See 1.)
@Luna-Klatzer Luna-Klatzer self-assigned this Jul 22, 2021
@Luna-Klatzer Luna-Klatzer changed the title New command parac analyse for Pre-Processor and Syntax Analysis in one [Tool Proposal] New command parac analyse for Pre-Processor and Syntax Analysis in one Jul 25, 2021
@Luna-Klatzer Luna-Klatzer added this to the Road to Hello World milestone Sep 16, 2021
@Luna-Klatzer Luna-Klatzer added enhancement New feature or request cli CLI issue, change or idea and removed dev labels Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cli CLI issue, change or idea enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant