Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Vadi is a simple, interpreted and dynamically-typed programming language. It comes with its own tool called a REPL, which lets you try out code quickly.
The interpreter which is the part of Vadi that runs your code, uses a technique named "Recursive Descent Parsing." This technique helps the interpreter understand your high-level code by creating a data-structure called a parse tree
. Then, the interpreter uses this parse tree to figure out what your code is asking it to do.You can check out the Vadi's Syntax Grammar in BNF for more information.
Use pip or pipx to install vadi's REPL.
[!TIP] The pipx package installer is strongly recommend for installing vadi on a global level to avoid conflicts.
pipx install vadi
OR
pip install vadi
Now, run the REPL.
vadi
The grammar is written in BNF(Backus Naur Form) notation.
<Interpreter> ::= <binary_expression>
| <unary_expression>
| <statement>
| <expression>
| <VAR>
| <FLT>
| <INT>
<binary_expression> ::= <expression> "+" <expression>
| <expression> "-" <expression>
| <expression> "*" <expression>
| <expression> "/" <expression>
| <expression> "=" <expression>
<unary_expression> ::= "+" <expression>
| "-" <expression>
<statement> ::= "DECL" <variable> "=" <expression>
<expression> ::= <term> "+" <term>
| <term> "-" <term>
<term> ::= <factor> "*" <factor>
| <factor> "/" <factor>
<factor> ::= "INT"
| "FLT"
| "(" <expression> ")"
| <VAR>
Unary operations
+1
-5
Binary operations
56+23
Complex arithmetic operations
1*2(4+5(5/6))
Variable declarations
var int = 89;
var float = 3.1415;
var difference = int - 20;
Conditionals: if-else
TODO: issue#2
Conditionals: loops
TODO: issue#2
Issues and Pull Requests are definitely welcome! Check out Contributing guidelines to get started. Everyone who interacts with the vadi project via codebase, issue tracker, chat rooms, or otherwise is expected to follow the Code of Conduct.
This project is licensed under the MIT License. See the LICENSE.
FAQs
REPL of a simple, interpreted and statically-typed programming language.
We found that vadi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.