report for lab5, md form

This commit is contained in:
2024-05-18 21:20:37 +03:00
parent c368ea5d9d
commit 74862ba3ef

View File

@@ -21,7 +21,7 @@ public class ConvertCNF {
Set<Character> nonTerminals = new HashSet<>(Arrays.asList('S', 'A', 'B', 'C', 'E')); Set<Character> nonTerminals = new HashSet<>(Arrays.asList('S', 'A', 'B', 'C', 'E'));
Set<Character> terminals = new HashSet<>(Arrays.asList('a', 'b')); Set<Character> terminals = new HashSet<>(Arrays.asList('a', 'b'));
Map<Character, List<String>> productions = new HashMap<>(); Map<Character, List<String>> productions = new HashMap<>();
productions.put('S', Arrays.asList("baC", "B")); productions.put('S', Arrays.asList("bAC", "B"));
productions.put('A', Arrays.asList("a", "aS", "bCaCb")); productions.put('A', Arrays.asList("a", "aS", "bCaCb"));
productions.put('B', Arrays.asList("AC", "bS", "aAa")); productions.put('B', Arrays.asList("AC", "bS", "aAa"));
productions.put('C', Arrays.asList("e", "AB")); productions.put('C', Arrays.asList("e", "AB"));