Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sk-azraf-sami/piratescript-compiler-design

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.
https://github.com/sk-azraf-sami/piratescript-compiler-design

abstract-syntax-tree bison bison-flex bison-yacc compiler-design grammar-parser grammer-checker lexical-analysis lexical-parser

Last synced: 1 day ago
JSON representation

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.

Awesome Lists containing this project

README

        

# 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:

```piratescript
pirate_
```

### Example:

```piratescript
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:

```piratescript
pirate_ loot value
```

### Example:

```piratescript
pirate_a loot 8
```

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

## Comments

### Single Line:

```piratescript
πŸ“οΈBlack Perl
```

### Multi-Line:

```piratescript
πŸ“ŒοΈ 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...