-1

I have a context free grammar sentence parser which functions correctly except for the fact that when you either type in something that doesn't exist in its knowledge base or doesn't conform to the grammar it will remain in an infinite loop. I assume that I simple cut statement will fix this but I'm not sure where to place it since everything recurses on one another.

false
  • 10,264
  • 13
  • 101
  • 209
user2211776
  • 239
  • 1
  • 2
  • 11

1 Answers1

0

See if removing left recursion in your context-free grammar gets rid of the infinite looping behavior.

Wayland Smith
  • 1,060
  • 8
  • 9