{"repo":"ShivamSarodia/ShivyC","free":true,"listed":false,"github":"https://github.com/ShivamSarodia/ShivyC","clone":"git clone https://github.com/ShivamSarodia/ShivyC.git","description":"C compiler created in Python.","language":"Python","stars":1064,"topics":["python","compiler","c"],"license":"MIT","category":"dev-tools","readme_excerpt":"ShivyC A hobby C compiler created in Python. --- ShivyC is a hobby C compiler written in Python 3 that supports a subset of the C11 standard and generates reasonably efficient binaries, including some optimizations. ShivyC also generates helpful compile-time error messages. This implementation of a trie is an example of what ShivyC can compile today. For a more comprehensive list of features, see the feature test directory. Quickstart x86-64 Linux ShivyC requires only Python 3.6 or later to compile C code. Assembling and linking are done using the GNU binutils and glibc, which you almost certainly already have installed. To install ShivyC: To create, compile, and run an example program: To run the tests: Other Architectures For the convenience of those not running Linux, the docker/ directory provides a Dockerfile that sets up an x86-64 Linux Ubuntu environment with everything necessary for ShivyC. To use this, run: This will open up a shell in an environment with ShivyC installed and ready to use with The Docker ShivyC executable will update live with any changes made in your local ShivyC directory. Implementation Overview Preprocessor ShivyC today has a very limited preprocessor that parses out comments and expands #include directives. These features are implemented between lexer.py and preproc.py . Lexer The ShivyC lexer is implemented primarily in lexer.py . Additionally, tokens.py contains definitions of the token classes used in the lexer and token kinds.py contains ins","default_branch":null,"files":null,"tree":[],"storefront":"/r/ShivamSarodia","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ShivamSarodia/ShivyC/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}