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

issue with generating ternary trees #12

Open
fredokun opened this issue Jul 12, 2013 · 1 comment
Open

issue with generating ternary trees #12

fredokun opened this issue Jul 12, 2013 · 1 comment

Comments

@fredokun
Copy link
Owner

The following spec works:


set min 100;
set max 120;
set try 500;

Functor ::= Term * Term ;
CFunctor ::= Term * Term ;
Term ::= Name * + Functor * + CFunctor * ;


however it generates 'Term' nodes whereas 'Term' is not a directly recursive rule

If we change the same spec as follows:


set min 100;
set max 120;
set try 5000;

Term ::= Name * + Functor * Term * Term * + CFunctor * Term * Term * ;


then only trees of size 1 are generated

Finally, with:


set min 100;
set max 120;
set try 5000;

Term ::= Name * + Functor * Term * Term * * + CFunctor * Term * Term * ;


There seems to be an infinite loop

@Kerl13
Copy link
Collaborator

Kerl13 commented Jan 19, 2022

There is no atom in these grammars, this cannot work with the current implementation.

Maybe atoms were implicitly added in a former implementation, back when this issue was posted?

I think I'm gonna close this issue unless it can be translated in to a bug with the current implementation

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

2 participants