%%{
machine superredcloth_scan;
include superredcloth_common "ext/superredcloth_scan/superredcloth_common.rl";
action extend { extend = rb_hash_aref(regs, ID2SYM(rb_intern("type"))); }
# blocks
notextile_tag_start = "" ;
notextile_tag_end = "" CRLF? ;
notextile_block_start = ( "notextile" >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ;
pre_tag_start = "
]* ">" (space* "")? ;
pre_tag_end = ("
" space*)? "
" CRLF? ;
pre_block_start = ( "pre" >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ;
bc_start = ( "bc" >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ; btype = ( "p" | "h1"...
block_start = ( btype >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ;
next_block_start = ( btype A C :> "."+ " " ) >A @{ p = reg - 1; } ;
pre_tag := |*
pre_tag_end { CAT(block); DONE(block); fgoto main; };
default => esc_pre;
*|;
notextile_tag := |*
notextile_tag_end { DONE(block); fgoto main; };
default => cat;
*|;
}%%
/*
* redcloth_scan.c.rl
*
* Copyright (C) 2009 Jason Garber
*/
#define redcloth_scan_c
!
#define RSTRING_NOT_MODIFIED
#include
#include "redcloth.h"
!
VALUE mRedCloth, super_ParseError, super_RedCloth, super_HTML, super_LATEX;
VALUE SYM_escape_preformatted, SYM_escape_attributes;
!
#line 23 "ext/redcloth_scan/redcloth_scan.c"
static const unsigned char _redcloth_scan_actions[] = {
0, 1, 0, 1, 2, 1, 3, 1,
4, 1, 5, 1, 6, 1, 7, 1,
9, 1, 10, 1, 11, 1, 12, 1,
13, 1, 14, 1, 15, 1, 16, 1,
17, 1, 18, 1, 19, 1, 20, 1,
21, 1, 22, 1, 23, 1, 24, 1,
25, 1, 26, 1, 27, 1, 28, 1,
29, 1, 30, 1, 34, 1, 35, 1,
36, 1, 38, 1, 40, 1, 42, 1,
43, 1, 44, 1, 45, 1, 48, 1,
57, 1, 58, 1, 59, 1, 60, 1,
61, 1, 62, 1, 63, 1, 64, 1,
65, 1, 66, 1, 70, 1, 73, 1,