https://github.com/mike-lischke/rc-converter
A tool to parse Windows resource files (.rc)
https://github.com/mike-lischke/rc-converter
Last synced: 6 months ago
JSON representation
A tool to parse Windows resource files (.rc)
- Host: GitHub
- URL: https://github.com/mike-lischke/rc-converter
- Owner: mike-lischke
- License: mit
- Created: 2020-01-19T15:03:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-03T20:41:44.000Z (almost 5 years ago)
- Last Synced: 2025-04-11T04:03:27.474Z (6 months ago)
- Language: Java
- Size: 570 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
This project implements a tool to parse Windows .rc files and converts them to xml files. Parsing .rc files is very much like parsing C/C++ header files. As such this tool might be interesting for people who have the need to parse such header files. The tool comes with:
- Handling for unlimited nesting of include files
- Trigraph handling and line splicing in the input reader
- Complete macro handling, including charizing and stringizing
- An evaluator for `#if`, `#ifdef` and `#ifndef` conditional expressions
- Support for some specialities used by (former) Borland CompilersCompiling the Grammars
===- Order is important: first expression parser then parser then lexer
- Copy token vocabulary from expression package (folder) to main package (folder)
- Adjust fixed token type constants (e.g. RCParserTokenTypes.LITERAL_auto3state, which is actually used in pure numerical form).PreprocessorInputState:
- \n must be an ignored character or another ignored character must be used on return when starting to read a new include file and
pushing the old state to create a new one.Command line:
`-include="" -symbol="RC_INVOKED" -symbol="_WIN32" -symbol="UNICODE" -symbol="APSTUDIO_INVOKED" -symbol="_WIN32_WINNT 0x0400" -symbol="_WIN32_IE 0x0600" -symbol="_MSC_VER 0x1300" -symbol="_INTEGRAL_MAX_BITS 32"`
VM arguments:
`-Dinclude-paths="${env_var:include}"`