Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. for col in 0...wordCount - 1 {
  2. for row in (0...wordCount - 1).reverse() {
  3. var t = row
  4. while t + 1 <= col {
  5. let arr1 = table[row][t]
  6. let arr2 = table[t + 1][col]
  7. if arr1.count == 0 || arr2.count == 0 {
  8. t += 1
  9. continue
  10. }
  11. if let nonTerminals = language.recognize(arr1: arr1, arr2: arr2) {
  12. for nonTerminal in nonTerminals {
  13. table[row][col].append(nonTerminal)
  14. }
  15. }
  16. t += 1
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement