Enter your CFG
Rule | Application | Result |
---|
Test CFG & PDA
Enter or generate a string to use for both CFG and PDA testing:
The application is an online converter for a given Context Free Grammar (CFG) to an equivalent non-deterministic Pushdown Automaton (nPDA) also enabling users to test any given CFG and the generated equivalent nPDA for user-defined or automatically generated strings.
1. Enter your context-free grammar (CFG) in the “Enter your CFG” section.
2. Click “Done” once you’ve entered all the rules, then click “Convert to PDA” to display the corresponding state diagram. If you want to input a new grammar, click “Restart.”
3. Enter or generate a string to test both the CFG and its equivalent nondeterministic Pushdown Automaton (nPDA).
4. Click “Test CFG” to check whether the string can be generated by the rules of the grammar you provided.
5. Click “Test PDA” to check whether the string is recognised by the equivalent nondeterministic pushdown automaton (nPDA). The recognition procedure is visualized in a step by step fashion when you click “Next”. The contents of the stack at each step are displayed above the state diagram of the nPDA.
6. Click “Download as image” to download the state diagram of the nPDA as an image.
7. If you click “Restart test,” the recognition process will be repeated by the nondeterministic Pushdown Automaton (nPDA) for the same string.
Please feel free to contact us at: cfg2npdaconverter@gmail.com
Enter your CFG
Rule | Application | Result |
---|
Test CFG & PDA
Enter or generate a string to use for both CFG and PDA testing:
Loading...