Skip to content

issue with generating ternary trees #12

Description

@fredokun

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions