Skip to content

The basics

Charlotte edited this page Apr 3, 2022 · 6 revisions

Syntax

The syntax is really easy to grasp (for the most part) let's see a line with a more.... natural language to represent the syntax
PRINT ( ADD ( 1 2 3 ) ); So each line is an instruction, for this line the main instruction is PRINT which is... yeah it prints the arguments must be between parenthesis each separated by a blank character, the argument(s) for this instruction is ADD ( 1 2 3 ) which is another instruction !
Because yeah of course for it to be a proper language instructions must be allowed to be passed as arguments of another instruction, the instruction add, add the value of the number inside, now please note that the distinction between integers ( like 1 ) and floats ( like 1.3 ) do exists because of the distinction existing in OCaml but the Baguette# interpreter does not care about the difference, the result is automatically converted to the most appropriate data type which is int if the number is whole ( like 1, or 34. ) and float if the number is not ( like 3.14 ). The result of the ADD instruction is 6 which is then printed so the result of the line is the value 6 being printed.
Please note that only the parenthesis and quotes are check pre-compilation ( or pre-interpretation ) you'll receive errors at runtime.

Keywords

Since the last update keywords were added for labels, gotos, and if ( and only in these situations !) and adopt the following syntax:

LABEL "name"
BEGIN
..
..
..
END;
GOTO "name";

and

IF <condition> 
THEN BEGIN
...
...
END;



Symbols

Now it would be utterly uninteresting if the language was just that ( well it would be exactly the same for me but it would be a lot less funnier for you ! ) so for the basic here is the table for the base of the language, pages will be uploaded ( and updated ) later to describe instructions by topic

  • The ( is CHOUQUETTE
  • The ) is CLAFOUTIS
  • The " are PARISBREST
  • The ; is of course BAGUETTE
  • The [ is BABAAURHUM
  • The ] is CHARLOTTEAUXFRAISES
  • The { is CRUMBLE
  • The } is SCHNECKENKUCHEN
  • Keyword BEGIN is MUFFIN
  • Keyword END is COOKIES
  • Keyword LABEL is ICECREAM
  • Keyword IF is SABLE
  • Keyword THEN is FRAMBOISIER
  • Keyword GOTO is PAINVIENNOIS
Clone this wiki locally