Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CompTree

C language code generator, for creating compiler test cases, as described at http://www.williamsonic.com/CompTree/index.html

Following is a simple example of how to build and run the CompTree code generator. First clone a local copy from this repository. Then navigate to the project directory and compile an executable from the source code.

MarksiMac:CompTree williamm$ cd ..
MarksiMac:Projects williamm$ cd CompTree
MarksiMac:CompTree williamm$ gcc CompTree.c
MarksiMac:CompTree williamm$ ./a.out
Usage: CompTree brnch.txt leaf.txt
Built: Aug 20 2026.
MarksiMac:CompTree williamm$ ./a.out Cbrnch.txt Cleaf.txt
what = ((((mon&&tue)*wed)-(thu/(fri%sat%(sun+mon+tue^wed))/thu)-fri*sat*sun&&mon/tue/wed%thu%fri&&sat-sun)+mon+tue); /* 23 7 */
what = ((((wed&&thu)*(fri/sat))-((sun-mon+tue^wed^thu&&fri&&sat*sun/mon/tue*wed)%thu%fri))+sat^sun%((mon-tue)+wed+thu)%fri+sat)^sun; /* 26 7 */
what = (mon*(tue&&wed&&thu)*fri); /* 5 2 */...

Run the program without arguments to see some usage text. Then run the program with two arguments naming a branch file and a leaf file. Randomly generated lines of code should appear on the console. The comment text at the end of each line indicates the node count and tree depth for that line. These lines can be copied and pasted, or redirected to a file for further processing and analysis.

About

C language code generator, for creating compiler test cases.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages