Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't get ouput! #2

Open
abolfazlaghdaee opened this issue Jun 13, 2022 · 9 comments
Open

I can't get ouput! #2

abolfazlaghdaee opened this issue Jun 13, 2022 · 9 comments

Comments

@abolfazlaghdaee
Copy link

Hello Dear BaseMax :) after inputting some CFG grammar the program doesn't return anything can you help me?!

@BaseMax
Copy link
Owner

BaseMax commented Jun 13, 2022

Hello Abolfazl.
I am not sure whether your request is to report a bug, or if it's a help/question.
It will be great if you can provide your sample input and the expected output.

@abolfazlaghdaee
Copy link
Author

for example, I input this CFG grammar as Input of the program and I want the program to return me the Chomsky form of the input grammar

this is my input grammar:
S -> SaB | aB
B -> bB

and the output should be :
S -> SD1 | VaB
B -> VbB
D1 ->VaB
Va -> a
Vb -> b
but the program doesnot return anythings

Screenshot (296)

@BaseMax
Copy link
Owner

BaseMax commented Jun 13, 2022

Sorry for the delay, I am on a trip and just arrived at the hotel. This project was for 2-3 years ago and I did not remember it completely. so I just read the source and now I know what is the problem.

In the main.py file, we have not printed the output, so you can print it if you going to save or show it.

In the following screenshot you can see the change I made to print the output:

image

P.S: If you saw any mistake or problem in the output just let me know that input or fix that by sending a Pull request.

Best Wishes,
M.

@abolfazlaghdaee
Copy link
Author

Oh thank you for your response.
have a nice trip ✌🏻
سفر سلامت :)

@BaseMax
Copy link
Owner

BaseMax commented Jun 13, 2022

You are welcome.

New update:
It seems I missed something, for complete working we need to call other functions too.
Such as formatter_grammers

Without them, we cannot get the real final output.

@BaseMax
Copy link
Owner

BaseMax commented Jun 13, 2022

If you know Python and have time, It will be good to read the source code.
It's not much long. only +100 LOC.

@mrkingali
Copy link

hello dear basemax
i have same problem
i had call formatter-grammer function
but its note work
could you please tell us the order of use of these function to get real output

@lcubrilo
Copy link

lcubrilo commented Sep 11, 2022

Bruh your main.py does not return any inputs (as others have already said).

for complete working we need to call other functions too

Why not just include all necessary calls in the main?
Since you presented an input and the subsequent output in the readme, then your program should do that out-of-the-box. This isn't IKEA, and even if it was, we didn't get the assembly guide.

@niharkajla28
Copy link

This code is not complete, there are functions which should receive values from other functions but there are no function call to them from necessary functions, and there are no comments about the code flow.

It would be great to know at least the code flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants