ALeRT is a tool to display the properties of a grammar graphically.

The idea came from wanting to show how left-recursion can be viewed as a cycle in a graph of dependencies of first sets, hence the name Automatic Left Recursion Tester.

Enter a grammar into the textarea, press the button and the graph of first set dependencies will appear.

Click the box below to see the syntax which the input grammar must follow.

Your grammar should be in the following format:
  • Productions should be separated by blank lines.
  • The head of the production should be on the left of a ::= symbol with the body after the symbol.
  • Productions with the same head can be list using a | symbol.
The sample grammar in the box below demonstrates these rules.

Here are two sample grammars.