Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit f675e8d

Browse files
committed
Added header, changed license and test file
1 parent bd35740 commit f675e8d

File tree

3 files changed

+33
-10
lines changed

3 files changed

+33
-10
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 ElBe
3+
Copyright (c) 2023 ElBe Development
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Main/lexer.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
1-
# HEADER
1+
#!/usr/bin/python3
2+
"""
3+
I Language lexer.
4+
Version: 0.1.2
5+
6+
Copyright (c) 2023-present ElBe Devleopment.
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a
9+
copy of this software and associated documentation files (the 'Software'),
10+
to deal in the Software without restriction, including without limitation
11+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
12+
and/or sell copies of the Software, and to permit persons to whom the
13+
Software is furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in
16+
all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS
19+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24+
DEALINGS IN THE SOFTWARE.
25+
"""
226

327

428
###########

test.ilang

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
2-
1+
// Testfile for the I programming language
32

43
use GarbageCollection;
54

6-
import file; //importiere built-in bibliothek
7-
?string[] mydata; //neue variable: array (string oder null)
5+
import file; // Imports buildin library
6+
?string[] mydata; // New variable: array (string or null) // Syntax may change
87

98
class Program(){
109
int main(){
1110
bool input_loop = true;
1211
while (input_loop){
1312
mydata.append(input("What to append? "));
1413
if (mydata[-1] == "quit"){
15-
mydata = mydata[:-1]; // array slicen
14+
mydata = mydata[:-1]; // Slice the array
1615
}
1716
}
1817
dynamic this_file = file.open();
19-
for(int i; i<len(mydata);i++;){ //hier bin ich mir noch nicht sicher, ob das eine schöne syntax ist
18+
for(int i; i<len(mydata);i++;){ // Syntax may change
2019
this_file.write_string(mydata[i]);
2120
}
22-
this_file.close()
23-
delete this_file; //muss nicht gemacht werden, da GarbageCollection an
21+
this_file.close() // Context Managers
22+
delete this_file; // Not needed, because of GarbageCollection
2423
return _PROGRAM_END;
2524
}
2625
}

0 commit comments

Comments
 (0)