Author | Manuela Ruiz (mruiz@lcc.uma.es) |
A sort of goal: satisfied when all the rules in the grammar have been applied
returns | true iff all the rules in the grammar have been applied |
# File lib/goals.rb, line 73 73: def satisfied? 74: satisfied = true 75: 76: if Shade.project.execution.execution_history 77: i = 0 78: while ((i < Shade.project.execution.grammar.rules.size) && (satisfied)) 79: rule_id = Shade.project.execution.grammar.rules[i].rule_id 80: j = 0 81: found = false 82: while ((j < Shade.project.execution.execution_history.size) && (!found)) 83: if Shade.project.execution.execution_history[j][0] == rule_id 84: found = true 85: end 86: j += 1 87: end 88: satisfied = found 89: i += 1 90: end 91: else 92: satisfied = false 93: end 94: 95: return satisfied 96: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.