Skip to content

Only one fandango object possible at times when using the API #708

@ninjafail

Description

@ninjafail

I'm not entirely sure whether this is intended but I just stumbled upon this.
When using the fandango python API, it is apparently not possible to use multiple Fandango() objects simultaneously. If want to use two different grammars simultaneously they end up being the same.

In the following example the grammars end up being the same.

from fandango import Fandango

grammar1 = "<start> ::= '1'+"
grammar2 = "<start> ::= '2'+"

f1 = Fandango(grammar1)
f2 = Fandango(grammar2)

assert f1.grammar != f2.grammar

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions