Decompile Progress .r File – Original
A hex dump mixed with token listings. For example:
OFFSET 0x0042: TOKEN_PUSH_VARIABLE "cCustName"
OFFSET 0x0048: TOKEN_DB_FIND "Customer"
OFFSET 0x0051: TOKEN_IF_EQUAL
for(f in funcs) cat(paste0("\n\n# Function: ", f, "\n"), file="recovered_code.R", append=TRUE) dump(f, file="recovered_code.R", append=TRUE)
Now open recovered_code.R – you have raw R function definitions.
What are .r files?
In Progress OpenEdge (formerly Progress 4GL), .r files are runnable bytecode produced by compiling .p (procedure) or .w (window) source files. They contain p-codes interpreted by the OpenEdge runtime engine. decompile progress .r file
Can you decompile them?
Officially: No. Progress Software does not offer a decompiler. The bytecode is proprietary, and attempts to reverse-engineer it violate most license agreements. Unofficially: Third-party tools have existed historically, but they are legally risky, often produce garbled output, and are not supported.
What you can do instead:
Legal note: In most jurisdictions, decompiling commercial software without explicit permission infringes copyright and license terms. Only proceed if you own the full IP rights. A hex dump mixed with token listings
If you clarify your specific goal (e.g., recovering lost source, auditing a binary, or converting to another language), I can offer more targeted advice.
Since the file extension .r is used in several different contexts (most notably R Programming Language scripts, REBOL scripts, and compiled R data objects), I have categorized this guide to cover the most common scenarios.
If your file is actually a script file written in R (usually denoted by a .R extension but sometimes mistakenly referred to or typed as .r), then: for(f in funcs) cat(paste0("\n\n# Function: ", f, "\n"),
If your goal is to decompile or reverse-engineer compiled or obfuscated R code:
If the code has been compiled using the compiler package (creating a bytecode file, often ending in .bc or just .r), it is harder to reverse.
If your goal is to understand or reverse-engineer an R script (.r file), here are some steps and considerations:
The most basic, legal, and supported way to understand a .r file is using the XREF (Cross-Reference) utility. While it does not give you source code, it gives you a map.