Sha256: 6042384864e70b89d3d341644c1d173c6fac752c255ddb9faec4d202bee6129f

Contents?: true

Size: 422 Bytes

Versions: 2

Compression:

Stored size: 422 Bytes

Contents

module Basic101

  class Parser < Parslet::Parser

    rule(:input_statement) do
      str('INPUT').as(:input) >>
        (space? >> quoted_string.as(:prompt) >>
         space? >> prompt_delimeter.as(:prompt_delimeter)).maybe >>
        space? >> reference_list.as(:references)
    end

    rule(:prompt_delimeter) do
      str(';').as(:prompt_delimeter) |
        str(',').as(:null_prompt_delimeter)
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
basic101-0.4.0 lib/basic101/parser/input_statement.rb
basic101-0.2.0 lib/basic101/parser/input_statement.rb