Skip to content

A compiler for a custom semi-Java programming language.

noa-farag/S-JavaCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This program will recieve a single parameter (S-java source file), the program returns:

  • 0 if the code is leagal.
  • 1 if the code is illegal + the error message.
  • 2 in case of IO errors + the error message.

S-Java: a simple version of Java.

  • S-Java file doesnt interact with other files, each file is standalone.
  • type of components: variables, methods (variables can be shared between methods, methods can call each other), comment lines, if and while blocks.

Variables in S-Java:

  • int
  • double
  • string
  • boolean
  • char

Methods in S-Java:

  • can contain if and while blocks
  • can be called only from another method
  • may not be declered inside another method

Our program will check if the code is legal such as the compiler does, if not it will return an indicative error message.

About

A compiler for a custom semi-Java programming language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages