Skip to content

Commit 800ad83

Browse files
committed
Fixed input not being recogonized in loops
1 parent e676264 commit 800ad83

File tree

10 files changed

+21
-17
lines changed

10 files changed

+21
-17
lines changed

build/lib/ettayi/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import argparse
22
import sys
3-
from interpreter import EttayiInterpreter
4-
from parser import ettayi_grammar # Import your grammar here
5-
import parser as parserr
3+
from ettayi.interpreter import EttayiInterpreter
4+
from ettayi.parser import ettayi_grammar # Import your grammar here
5+
import ettayi.parser as parserr
66
from lark import Lark
77

88
def main():

build/lib/ettayi/interpreter.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from lark import Lark, Tree, Token
22

3-
import parser as parsera
43
from ettayi.parser import parser
54

65
class EttayiInterpreter:
@@ -288,7 +287,7 @@ def execute_ettayi_file(filename):
288287
# Initialize the interpreter and parser
289288
if __name__ == "__main__":
290289
# Ensure you import the Ettayi grammar and transformer from your parser file
291-
parsera = Lark(parsera.ettayi_grammar, parser="lalr", transformer=parsera.EttayiTransformer())
290+
parser = Lark(parser.ettayi_grammar, parser="lalr", transformer=parser.EttayiTransformer())
292291
interpreter = EttayiInterpreter()
293292

294293
code = '''
@@ -297,7 +296,7 @@ def execute_ettayi_file(filename):
297296

298297

299298
# Parse the code using the Ettayi parser
300-
ast = parsera.parse(code)
299+
ast = parser.parse(code)
301300
print(f"Generated AST: {ast}")
302301

303302
# Execute the parsed AST with the interpreter

dist/ettayi-1.0.3-py3-none-any.whl

-9.17 KB
Binary file not shown.

dist/ettayi-1.0.3.tar.gz

-8.84 KB
Binary file not shown.

dist/ettayi-1.0.6-py3-none-any.whl

9.18 KB
Binary file not shown.

dist/ettayi-1.0.6.tar.gz

8.89 KB
Binary file not shown.

ettayi.egg-info/PKG-INFO

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: ettayi
3-
Version: 1.0.3
3+
Version: 1.0.6
44
Summary: Ettayi Lang
55
Home-page: https://github.com/Apollo-Blaze/ettayi
66
Author: Apollo-Blaze
@@ -17,9 +17,15 @@ Requires-Dist: lark-parser>=0.12.0
1717

1818
Tired of coding in English? Why not code in Malayalam for a change? Ettayi is a programming language that lets you write code in Manglish, blending Malayalam and English for a fun experience. Bring a little Kerala flair to your code and make programming a bit more exciting!
1919

20-
**Disclaimer:** No, this is *definitely* not copied from Bhai Lang! 😜
21-
![Code](assets/1.jpeg)
22-
![Output](assets/2.jpeg)
20+
**Disclaimer:** No, this is *definitely* not inspired from Bhai Lang! 😜
21+
22+
<p align="center">
23+
<img src="assets/1.jpeg" alt="Code">
24+
</p>
25+
26+
<p align="center">
27+
<img src="assets/2.jpeg" alt="Output">
28+
</p>
2329

2430
## Features
2531

@@ -54,10 +60,10 @@ Tired of coding in English? Why not code in Malayalam for a change? Ettayi is a
5460
anenki (x > 0) {
5561
"Positive" para;
5662
}
57-
ithinulil (x = 1..10) {
63+
allenki (x < 10) {
5864
x para;
5965
}
60-
allenki{
66+
avasanam {
6167
"hello" para;
6268
}
6369
````

ettayi/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33
from ettayi.interpreter import EttayiInterpreter
44
from ettayi.parser import ettayi_grammar # Import your grammar here
5-
import parser as parserr
5+
import ettayi.parser as parserr
66
from lark import Lark
77

88
def main():

ettayi/interpreter.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from lark import Lark, Tree, Token
22

3-
import parser as parsera
43
from ettayi.parser import parser
54

65
class EttayiInterpreter:
@@ -288,7 +287,7 @@ def execute_ettayi_file(filename):
288287
# Initialize the interpreter and parser
289288
if __name__ == "__main__":
290289
# Ensure you import the Ettayi grammar and transformer from your parser file
291-
parsera = Lark(parsera.ettayi_grammar, parser="lalr", transformer=parsera.EttayiTransformer())
290+
parser = Lark(parser.ettayi_grammar, parser="lalr", transformer=parser.EttayiTransformer())
292291
interpreter = EttayiInterpreter()
293292

294293
code = '''
@@ -297,7 +296,7 @@ def execute_ettayi_file(filename):
297296

298297

299298
# Parse the code using the Ettayi parser
300-
ast = parsera.parse(code)
299+
ast = parser.parse(code)
301300
print(f"Generated AST: {ast}")
302301

303302
# Execute the parsed AST with the interpreter

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="ettayi",
5-
version="1.0.3",
5+
version="1.0.6",
66
author="Apollo-Blaze",
77
author_email="[email protected]",
88
description="Ettayi Lang",

0 commit comments

Comments
 (0)