Skip to content

Formal languages and automata group assignment. Given a grammar description, transforms it into Chomsky normal form and creates a CYK parser from it. Then, given a word in the language, generates all its possible parse trees.

License

Notifications You must be signed in to change notification settings

arsaccol/FormalLanguages

This branch is up to date with PedroCardouzo/FormalLanguages:master.

Folders and files

NameName
Last commit message
Last commit date
Jun 16, 2018
Jun 16, 2018
May 12, 2018
May 1, 2018
Jun 15, 2018
Jun 15, 2018
Jun 11, 2018

Repository files navigation

Formal Languages Assignment

00275739 - Pedro Emilio Cardouzo

00244113 - Giovani Chassot Simon

00205685 - Alexandre dos Reis Saccol

Usage:

Providing grammar and single input without spaces:

$ python main.py grammars/grammar_name.txt this_is_a_word

Providing grammar and single input with spaces (use quote marks):

$ python main.py grammars/grammar_name.txt "this is a sentence"

Providing just grammar, with inputs provided in the program:

$ python main.py grammars/grammar_name.txt

Running the program without command-line arguments, providing grammar and input within the program:

$ python main.py

About

Formal languages and automata group assignment. Given a grammar description, transforms it into Chomsky normal form and creates a CYK parser from it. Then, given a word in the language, generates all its possible parse trees.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%