File: error1.rex

package info (click to toggle)
rexical 1.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 316 kB
  • sloc: ruby: 1,124; makefile: 8; ansic: 5
file content (15 lines) | stat: -rw-r--r-- 247 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# eooro1.rex
# lexical definition sample for rex
#

class Error1
macro
  BLANK         [\ \t]+
rule
  {BLANK}       # no action
  \d+           { [:digit, text.to_i] }
  \w+           { [:word, text] }
  \n
#  .             { [text, text] }
end