Skip to content

Commit

Permalink
add readme but not finished
Browse files Browse the repository at this point in the history
  • Loading branch information
HankelBao committed Nov 22, 2018
1 parent 395cbff commit 784db82
Show file tree
Hide file tree
Showing 91 changed files with 86 additions and 461,925 deletions.
Binary file modified PyPse/__pycache__/converters.cpython-37.pyc
Binary file not shown.
Binary file modified PyPse/__pycache__/output.cpython-37.pyc
Binary file not shown.
Binary file modified PyPse/__pycache__/pypse_run.cpython-37.pyc
Binary file not shown.
3 changes: 1 addition & 2 deletions PyPse/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ def convert_token_to_value(value_token: Tree) -> ValueType:
value_type = ValueType.REAL
value_in_python = float(value_str)
if valuetype_str == "string":
value_type = ValueType.STRING
value_in_python = str(value_str)
value_in_python = str(value_str)[1:-1]
value = Value(value_type)
value.assign_value_in_python(value_in_python)
return value
Expand Down
1 change: 0 additions & 1 deletion PyPse/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def fatal():
class Warnings():
def output(content: str):
global current_block, current_line_num_start, current_line_num_end, WARNING_MODE
print(WARNING_MODE)
if WARNING_MODE:
if current_line_num_end:
print(f"line {current_line_num_start}~{current_line_num_end} {str(current_block)}: {content}")
Expand Down
1 change: 0 additions & 1 deletion PyPse/pypse_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
def pypse_run(file, DEBUG=False, WARNING=True):
global WARNING_MODE
WARNING_MODE = WARNING
print(WARNING_MODE)

Messages.loaded_file(file.name)

Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# PyPse - A Pseudocode Compiler in Python
# [P](#)y[P](#)se - A Pseudocode Compiler in Python

## Introduction

PsPse is a full-featured interpreted compiler for teaching purposes.

Features:

* Compile all codes in AS-Level Computer Science Syllabus
* Portable with no environemt requirements
* Available in Windows and Linux
* Continuously developing based on my interest

I am new to comiplers. Feel free to raise issues or contribute.

![demo_screenshot](screenshots/demo_screenshot.png)

## Why?
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from PyPse import pypse_run


file = open("test.pse", "r")
file = open("test.5.pse", "r")
pypse_run(file, DEBUG=False, WARNING=False)
Binary file modified pypse.bin
Binary file not shown.
Binary file modified pypse.build/.sconsign.dblite
Binary file not shown.
Binary file modified pypse.build/CompiledCodeHelpers.o
Binary file not shown.
Binary file modified pypse.build/CompiledFunctionType.o
Binary file not shown.
Binary file modified pypse.build/CompiledMethodType.o
Binary file not shown.
Binary file modified pypse.build/InspectPatcher.o
Binary file not shown.
Binary file modified pypse.build/MetaPathBasedLoader.o
Binary file not shown.
275 changes: 1 addition & 274 deletions pypse.build/__constants.bin

Large diffs are not rendered by default.

Loading

0 comments on commit 784db82

Please sign in to comment.