Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
added zip, added readme with intended solution
Browse files Browse the repository at this point in the history
  • Loading branch information
jasminapegan authored and aJuvan committed Apr 14, 2022
1 parent 108a79a commit cbd22f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions challs/context_free_grammar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Intended solution

1. Read folder structure as productions.
2. Folders are nonterminals, files are terminals.
3. Simplify and reduce.
4. Some parts are quickly guessable, others can be permuted from given letters and word lengths.
Binary file added challs/context_free_grammar/chall/cfg.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions challs/context_free_grammar/solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ def get_rules(path, outf):
line = dir + " -> " + "|".join([x.replace(".txt", "") for x in os.listdir(os.path.join(path, dir))]) + "\n"
f.write(line)

file = "chall/cfg.txt"
grammar = Grammar(file)
#file = "chall/cfg.txt"
#grammar = Grammar(file)
#grammar.reduce_mappings()
#grammar.add_useless_productions()
#grammar.scramble_nonterminals()
Expand Down

0 comments on commit cbd22f8

Please sign in to comment.