Skip to content

Welcome to the high seas of programming with PirateScript, a language as adventurous and cunning as a pirate on the hunt for buried treasure. PirateScript be more than just a set of code rules; it's a linguistic journey through the seven seas of syntax and semantics, where every line of code tells a tale of daring escapades and nautical exploits.

License

Notifications You must be signed in to change notification settings

Sk-Azraf-Sami/PirateScript-Compiler-Design

Repository files navigation

PirateScript-Compiler-Design

coding

Introduction to PirateScript: A Programming Language with a Swashbuckling Twist Ahoy, ye scallywags and code enthusiasts! Welcome to the high seas of programming with PirateScript, a language as adventurous and cunning as a pirate on the hunt for buried treasure. PirateScript be more than just a set of code rules; it's a linguistic journey through the seven seas of syntax and semantics, where every line of code tells a tale of daring escapades and nautical exploits.

Setting Sail with PirateScript: The Basics PirateScript be designed for both seasoned developers and landlubbers lookin' to embark on a voyage into the world of programming. With its unique blend of traditional programming constructs and the whimsy of the pirate's life, it be language that be as fun to write as it be to read.

Variable Types

JackSparrow_i (integer)

Description: The variable JackSparrow_i is an integer used to represent a numeric value associated with the legendary pirate Jack Sparrow.

Usage: This variable is intended to store whole number values, such as counts, indices, or any other integer-related information in the context of the program.

Fury_f (float)

Description: The variable Fury_f is a float used to represent a numeric value associated with the concept of fury or intensity.

Usage: This variable is suitable for storing decimal or floating-point values, providing precision for computations involving non-integer numbers.

Charlotte_c (char)

Description: The variable Charlotte_c is a character variable designed to store a single character, specifically associated with the character "Charlotte."

Usage: This variable is intended for holding single character values, such as letters, digits, or special characters.

DavyJones_d (double)

Description: The variable DavyJones_d is a double used to represent a numeric value associated with the legendary character Davy Jones.

Usage: This variable is suitable for storing double-precision floating-point values, providing higher precision compared to the float data type.

Variable Declaration

Syntax:

pirate_<variable_name>

Example:

JackSparrow_i pirate_a

Here, "JackSparrow_i" is the data type, and by starting with "pirate_", it signifies a variable. "a" is the variable name.

Variable Initialization

Syntax:

pirate_<variable_name> loot value

Example:

pirate_a loot 8

Here, "loot" is the assignment keyword, and it assigns the value 8 to the variable "pirate_a."

Comments

Single Line:

📍️Black Perl

Multi-Line:

📌️ Jack Sparrow
Pirate Captain
📌️

Operators

Arithmetic Operators:

  • "booty" (Plus)
  • "mutiny" (Minus)
  • "gun" (Multiplication)
  • "gold" (Division)

Unary Operators:

  • "⚓️++" (Increment)
  • "⚓️--" (Decrement)
  • "!⚓️" (Not)

Logical Operators:

  • "&&" (Logical AND)
  • "||" (Logical OR)
  • "!!" (Logical NOT)

Relational Operators:

  • "tiny" (Less than)
  • "mighty" (Greater than)

Conditional Statements

  • "Parley" (If)
  • "Aye" (Else)
  • "ElseWise" (Else If)

Switch Statement

  • "Pirate_Code" (Case)
  • "Code_Book" (Switch)

Loops

  • "Shanty" (For)
  • "Whale" (While)

Functions

  • "Captain" (Main function)
  • "crew" (User-defined function)
  • "gunPowder" (Power function)
  • "fact" (Factorial function)

Additional Syntax

  • "LeftCannon " (Left first bracket)
  • "RightCannon " (Right first bracket)
  • "yo_ho" (Comma)
  • "🏴‍☠️️" (Statement indicator)
  • "LeftBow" (Left second bracket)
  • "RightBow" (Right second bracket)

Feel free to use this documentation to create a PirateScript! Yo-ho...

About

Welcome to the high seas of programming with PirateScript, a language as adventurous and cunning as a pirate on the hunt for buried treasure. PirateScript be more than just a set of code rules; it's a linguistic journey through the seven seas of syntax and semantics, where every line of code tells a tale of daring escapades and nautical exploits.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published