Sha256: 537257d791c4a889b5de78ac162505e2dbc4f0ff985e135b1146ee45b62043f2

Contents?: true

Size: 946 Bytes

Versions: 8

Compression:

Stored size: 946 Bytes

Contents

module Tnql
  grammar Treatment
    rule treatment
      treated_keyword conditions:treatment_conditions+
    end

    rule treated_keyword
      space 'treated' word_break
    end

    rule treatment_conditions
      treatmentdate_range / treatmentdate_detail / treatment_provider
    end

    rule treatmentdate_range
      space 'between' space start:date_fragment space 'and' space finish:date_fragment <Nodes::TreatmentDateRangeNode>
    end

    rule treatmentdate_detail
      space ('in' / 'on') space date_fragment <Nodes::TreatmentPreciseDateNode>
    end

    rule treatment_provider
      space 'at' space provider:(treatment_provider_code / treatment_provider_name)
    end

    rule treatment_provider_name
      (!(space provider_type) .)+ space provider_type <Nodes::TreatmentProviderNameNode>
    end

    rule treatment_provider_code
      provider_type space code:(!' ' .)+ <Nodes::TreatmentProviderCodeNode>
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tnql-1.1.2 lib/tnql/grammars/treatment.treetop
tnql-1.1.1 lib/tnql/grammars/treatment.treetop
tnql-1.1.0 lib/tnql/grammars/treatment.treetop
tnql-1.0.4 lib/tnql/grammars/treatment.treetop
tnql-1.0.3 lib/tnql/grammars/treatment.treetop
tnql-1.0.2 lib/tnql/grammars/treatment.treetop
tnql-1.0.1 lib/tnql/grammars/treatment.treetop
tnql-1.0.0 lib/tnql/grammars/treatment.treetop