Sha256: 570f4a9636bae7139013451062393754c36ed929407b9eb26b2002a7bdef8358

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

Productions:
%len = grammar.all_productions.size.to_s.size
%productions = recognizer.states.map(&:rules).inject(:merge).
%  select(&:final?).map { |x| [x.to_s(false), x.production.block] }
%body = productions.map { |_| _[0].size }.max
%productions.each do |prod|
  {{= sprintf("%-#{body}s", prod[0]) }} %{prod[1]}
%end

% if table.each_with_index.any? { |_, i| tableizer.conflicts[i].each.
%   select { |(_, v)| v[:result] == 0 || directives.output.verbose }.any? }
Error:
%  table.each_with_index do |_, i|
%    conflicts = tableizer.conflicts[i].each.
%      select { |(_, v)| v[:result] == 0 || directives.output.verbose }
%    next unless conflicts.any?
  Conflicts in State %{i}:
%    conflicts.each do |token, value|
    On %{token}{{= ' (resolved)' if value[:result] != 0 }}:
      %{value[:data][0].join(' ')}/%{value[:data][1].join(' ')} (%{value[:prec]} vs %{value[:terminal]}, %{value[:result]})
      Rules:
%     value[:rules].each do |rule|
        %{rule}
          {%{rule.lookahead.to_a.join(', ')}}
%     end
      Transitions:
%     value[:transitions].each do |transition|
        %{transition}
%     end
%    end
%  end
%else
No errors :)
%end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
antelope-0.3.2 lib/antelope/generator/templates/error.ant
antelope-0.3.0 lib/antelope/generator/templates/error.ant
antelope-0.2.4 lib/antelope/generator/templates/error.ant
antelope-0.2.3 lib/antelope/generator/templates/error.ant