Skip to content

Implementation in Java of a micro compiler including simple expressions, assignment instruction and if-then-else condition.

License

Notifications You must be signed in to change notification settings

Mehdi-ELHOURI/micro_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

micro_compiler

Implementation in Java of a micro compiler including:

  • Constant and variable declaration.
  • Simple expressions.
  • Assignment instruction.
  • If-then-else condition.

The micro_compiler consists of 2 phases:
  1. Analysis phase, which includes:
    • Lexical analysis, using a pre-defined regular grammar.
    • Syntax analysis, using a context-free grammar.
    • Semantic analysis, using syntax directed translation.
  2. Code generation phase: which was integrated in the parser and generates a set of assembly code instructions.

EBNF representation of the syntax:

EBNF

Input:

input

Output:

output

About

Implementation in Java of a micro compiler including simple expressions, assignment instruction and if-then-else condition.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages