Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Extract macro values (#define) from the header file and store in a readable format.

Notifications You must be signed in to change notification settings

two-dimensional-array/define_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

18 Commits

Repository files navigation

Define Parser

Extract macro values (#define) from the header file and store in a readable format.

Command Line Arguments

  • -h | --header - Path to the header file that should be parsed.
  • -j | --json - Path to JSON file, which contain all parsed macro names.
  • -h | --flags - Compilation flags.
  • -i | --include - Path to include path file.
  • -d | --define - Path to defines file.
  • -s | --substitute - Path to file, in which need substitute defines values.

Startup Define Parser script

Example of command startup define parser script. In this repository example of command startup is located in Makefile file.

~/repository_directory/python define_parser.py -h header.h -j defines.json -s main.c

Example of output JSON file

In this repository example of JSON file is defines.json file.

{
 "macro_name1": "value",
 "macro_name2": "value",
 "macro_name3": "value"
}

About

Extract macro values (#define) from the header file and store in a readable format.

Topics

Resources

Stars

Watchers

Forks

AltStyle によって変換されたページ (->オリジナル) /