readme
This commit is contained in:
28
README.md
28
README.md
@ -12,8 +12,11 @@
|
|||||||
- Environment variables
|
- Environment variables
|
||||||
- redirection support
|
- redirection support
|
||||||
|
|
||||||
## Bellande Rust Executable Builder
|
|
||||||
- https://github.com/Algorithm-Model-Research/bellande_rust_executable
|
# Bellos executable run scripts
|
||||||
|
```
|
||||||
|
./bellos hello_world.bellos
|
||||||
|
```
|
||||||
|
|
||||||
## BELLOS Usage
|
## BELLOS Usage
|
||||||
```
|
```
|
||||||
@ -26,9 +29,9 @@ echo "Hello, World!"
|
|||||||
# Using variables
|
# Using variables
|
||||||
name="Bellos"
|
name="Bellos"
|
||||||
echo "Welcome to $name programming!"
|
echo "Welcome to $name programming!"
|
||||||
|
```
|
||||||
|
|
||||||
# ----------------------------------------
|
```
|
||||||
|
|
||||||
#!/usr/bin/env bellos
|
#!/usr/bin/env bellos
|
||||||
# File: basic_math.bellos
|
# File: basic_math.bellos
|
||||||
|
|
||||||
@ -45,9 +48,9 @@ echo "Sum: $sum"
|
|||||||
echo "Difference: $difference"
|
echo "Difference: $difference"
|
||||||
echo "Product: $product"
|
echo "Product: $product"
|
||||||
echo "Quotient: $quotient"
|
echo "Quotient: $quotient"
|
||||||
|
```
|
||||||
|
|
||||||
# ----------------------------------------
|
```
|
||||||
|
|
||||||
#!/usr/bin/env bellos
|
#!/usr/bin/env bellos
|
||||||
# File: control_structures.bellos
|
# File: control_structures.bellos
|
||||||
|
|
||||||
@ -79,9 +82,9 @@ do
|
|||||||
echo $count
|
echo $count
|
||||||
count=$((count - 1))
|
count=$((count - 1))
|
||||||
done
|
done
|
||||||
|
```
|
||||||
|
|
||||||
# ----------------------------------------
|
```
|
||||||
|
|
||||||
#!/usr/bin/env bellos
|
#!/usr/bin/env bellos
|
||||||
# File: functions.bellos
|
# File: functions.bellos
|
||||||
|
|
||||||
@ -99,9 +102,10 @@ function add() {
|
|||||||
greet "User"
|
greet "User"
|
||||||
result=$(add 3 4)
|
result=$(add 3 4)
|
||||||
echo "3 + 4 = $result"
|
echo "3 + 4 = $result"
|
||||||
|
```
|
||||||
|
|
||||||
# ----------------------------------------
|
|
||||||
|
|
||||||
|
```
|
||||||
#!/usr/bin/env bellos
|
#!/usr/bin/env bellos
|
||||||
# File: file_operations.bellos
|
# File: file_operations.bellos
|
||||||
|
|
||||||
@ -124,9 +128,9 @@ done < test.txt
|
|||||||
|
|
||||||
# Cleaning up
|
# Cleaning up
|
||||||
rm test.txt
|
rm test.txt
|
||||||
|
```
|
||||||
|
|
||||||
# ----------------------------------------
|
```
|
||||||
|
|
||||||
#!/usr/bin/env bellos
|
#!/usr/bin/env bellos
|
||||||
# File: string_manipulation.bellos
|
# File: string_manipulation.bellos
|
||||||
|
|
||||||
@ -151,7 +155,7 @@ echo "Uppercase: ${string^^}"
|
|||||||
echo "Lowercase: ${string,,}"
|
echo "Lowercase: ${string,,}"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Website Crates
|
## Website NPM
|
||||||
- https://crates.io/crates/bellos
|
- https://crates.io/crates/bellos
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
@ -171,11 +171,10 @@ impl Lexer {
|
|||||||
"else" => Token::Else,
|
"else" => Token::Else,
|
||||||
"fi" => Token::Fi,
|
"fi" => Token::Fi,
|
||||||
"while" => Token::While,
|
"while" => Token::While,
|
||||||
|
"for" => Token::For,
|
||||||
"do" => Token::Do,
|
"do" => Token::Do,
|
||||||
"done" => Token::Done,
|
"done" => Token::Done,
|
||||||
"for" => Token::For,
|
|
||||||
"in" => Token::In,
|
"in" => Token::In,
|
||||||
"function" => Token::Function,
|
|
||||||
_ => Token::Word(word),
|
_ => Token::Word(word),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user