Skip to main content
  1. Projects/

cruz-lang

·127 words·1 min
Jake Roggenbuck
Author
Jake Roggenbuck
I am currently studying Computer Science

Cruzlang #

Cruz Lang is a simple explicit static typed language.
The compiler written in python is called shark and uses ply.lex for lexical analysis.
It has 5 primitive data types:

Data types #

  • byte one byte of data
  • char one ASCII character
  • int a 32 bit integer
  • prec a number with a decimal point of 4 bytes
  • ptr a 4 byte pointer address

Other key words #

  • fun the function key word
  • while a while loop
  • write output as stdout
  • read input as stdin
  • with uses external files
  • if do something if condition true
  • elif else do something if condition true
  • else else do something
  • takes place for parameters and types
  • return a return
  • returns tells function what type to return

Here is the syntax:
Syntax