Skip to content

IbrahimHiarea/FlutterX-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlutterX Compiler

The FlutterX Compiler is a powerful tool designed to compile a custom language, specifically created by our team. This custom language is designed to resemble the Flutter framework and enables developers to write applications using its unique syntax. The compiler converts these custom language applications into web-based applications using HTML, CSS, and JavaScript. The compilation process involves generating a parse tree using a lexer and parser that we implemented.

Features

  • Custom Language Support: The compiler supports a custom language designed by our team, resembling the Flutter framework, allowing developers to write applications using a familiar syntax.
  • Web Application Conversion: The compiler converts applications written in the custom language into web-based applications, generating HTML, CSS, and JavaScript code that can be deployed as a website.
  • Lexer and Parser Implementation: We have implemented the lexer and parser for our custom language, defining the lexical rules and grammar for the language.
  • AST Tree Construction: The compiler constructs an Abstract Syntax Tree (AST) by analyzing the parse tree generated by our lexer and parser. The AST represents the structure of the custom language code.
  • Semantic Checks: The compiler performs semantic checks on the AST to ensure the program adheres to the language's semantics. This stage ensures that the code is consistent and free from errors or inconsistencies.
  • Code Generation: Once the semantic checks pass, the compiler generates equivalent HTML, CSS, and JavaScript code based on the AST. It leverages helper libraries such as Closure Compiler, Jsoup-1.16.1, and Commons-IO-2.12.0 to optimize and facilitate file creation and writing operations.

Dependencies

The FlutterX Compiler has the following dependencies:

  • Antler4: The Antler tool is used for generating the parse tree from the custom language source code. Make sure to install and configure Antler according to its documentation.
  • Closure Compiler: Closure Compiler is a JavaScript optimization tool used by the compiler to optimize and minify the generated JavaScript code. Ensure that Closure Compiler is installed and accessible in the system's PATH.
  • Jsoup-1.16.1: Jsoup is a Java library used by the compiler to manipulate HTML content during the code generation process. Add the Jsoup-1.16.1 library to your project's classpath.
  • Commons-IO-2.12.0: Commons IO is a Java library used by the compiler for file-related operations, such as creating and writing files. Include the Commons-IO-2.12.0 library in your project's classpath.

Compiler Design (class Diagram)

main Structe

Expression

Statement

symbol table

widget

widgetAttr

About

The FlutterX Compiler is a powerful tool designed to compile a flutter like application to a website.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published