File: lua_string.kpeg

package info (click to toggle)
ruby-kpeg 1.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 608 kB
  • sloc: ruby: 11,839; makefile: 10
file content (14 lines) | stat: -rw-r--r-- 239 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
%% name = LuaString

%% {
  attr_accessor :result
}


equals = < "="* > { text }

equal_ending(start) = "]" equals:x &{ x == start } "]"

root = "[" equals:e "[" < (!equal_ending(e) .)* > equal_ending(e) {
         @result = text
       }