Sha256: 8c3b269267f8f2ce4d21b9b24f954944afd7bf7d3fc8715db7855bee70123625

Contents?: true

Size: 803 Bytes

Versions: 10

Compression:

Stored size: 803 Bytes

Contents

#
# sample2.rex
# lexical definition sample for rex
#
# usage
#  rex  sample2.rex  --stub
#  ruby sample2.rex.rb  sample2.bas
#

class Sample2
option
  ignorecase

macro
  BLANK         \s+
  REMARK        \'              # '

rule
                {REMARK}        { state = :REM;  [:rem_in, text] } # '
  :REM          \n              { state = nil;   [:rem_out, text] }
  :REM          .*(?=$)         {                [:remark, text] }

                \"[^"]*\"       { [:string, text] } # "

                {BLANK}         # no action

                INPUT           { [:input, text] }
                PRINT           { [:print, text] }

                \d+             { [:digit, text.to_i] }
                \w+             { [:word, text] }
                .               { [text, text] }
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
rexical-1.0.7 sample/sample2.rex
aaronp-frex-1.0.0 sample/sample2.rex
aaronp-frex-1.0.1 sample/sample2.rex
tenderlove-frex-1.0.1.20090313144615 sample/sample2.rex
rexical-1.0.5 sample/sample2.rex
rexical-1.0.5.beta2 sample/sample2.rex
rexical-1.0.5.beta1 sample/sample2.rex
rex-1.0.2 sample/sample2.rex
rexical-1.0.4 sample/sample2.rex
rexical-1.0.3 sample/sample2.rex