NL = "\n" SP = [ \t] HR = "\n---"[\-]* (MAX) H1 = "\n==" H2 = "\n===" H3 = "\n====" P = "\n\n" Q2 = "''" (MAX) Q3 = "'''" (MAX) Q5 = "'''''" (MAX) WORD = ([^ \n\t\[\]<>\|\']+) (MAX) ANY = .* (MAX) NOWIKI = [^ \n\t\r]+ (MAX) URL = "http://"[^ \n\t\r]+ (MAX) wiki : [items is] = [ANY "Wiki"] </> </> <body> [items is] </> </> items : [item i] [items is] = [item i] [items is] : = item >: [HR] = <hr></> >: [H3] _ [flats fs] _ "====" = <h3> [flats fs] </> >: [H2] _ [flats fs] _ "===" = <h2> [flats fs] </> >: [H1] _ [flats fs] _ "==" = <h1> [flats fs] </> >: "<pre>" [ANY a] "</pre>" = <pre> [ANY a] </> >: "<nowiki>" _ [nowiki nw] "</nowiki>" = <pre class="nowiki"> [nowiki nw] </> >: [list l] = [list l] >: [flat f] = [flat f] >: [P] = <p></> >: [NL] = __ nowiki : [NOWIKI n] __ [nowiki nw] = [NOWIKI n] __ [nowiki nw] : = list : [NL] "*" _ [listu l] = <ul> [listu l] </> listu : [flats fs] [NL] "*" _ [listu l] = <li> [flats fs] </> [listu l] : [flats fs] [list2 l2] [NL] "*" _ [listu l] = <li> [flats fs] </> [list2 l2] [listu l] : [flats fs] [list2 l2] = <li> [flats fs] </> [list2 l2] : [flats fs] = <li> [flats fs] </> list2 : [NL] "**" _ [listuu l] = <ul> [listuu l] </> listuu >: [flats fs] [NL] "**" _ [listuu l] = <li> [flats fs] </> [listuu l] >: [flats fs] [list3 l3] [NL] "**" _ [listuu l] = <li> [flats fs] </> [list3 l3] [listuu l] >: [flats fs] = <li> [flats fs] </> list3 : [NL] "***" _ [listuuu l] = <ul> [listuuu l] </> listuuu >: [flats fs] [NL] "***" _ [listuuu l] = <li> [flats fs] </> [listuuu l] >: [flats fs] = <li> [flats fs] </> flat >: [Q5] _ [words ws] _ [Q5] = <b> <i> [words ws] </> </> >: [Q3] _ [words ws] _ [Q3] = <b> [words ws] </> >: [Q2] _ [words ws] _ [Q2] = <i> [words ws] </> >: "<tt>" _ [words ws] _ "</tt>" = <tt> [words ws] </> >: "<sup>" _ [words ws] _ "</sup>" = <sup> [words ws] </> >: "<sub>" _ [words ws] _ "</sub>" = <sub> [words ws] </> >: "<big>" _ [words ws] _ "</big>" = <big> [words ws] </> >: "<br>" = <br></> >: [SP] = __ >: "[" [URL u] __ [words ws] "]" = <a href=[URL u]> [words ws] </> >: "[[Image:" [WORD w] "|" [words ws] "]]" = <img src=[WORD w] alt=[words ws]></> >: "[[" [WORD w] "|" [words ws] "]]" = <a href=[WORD w]> [words ws] </> >: [WORD w] = [WORD w] flats : [flat f] [flats fs] = [flat f] [flats fs] : = words: [WORD w] [SP] [words ws] = [WORD w] [SP] [words ws] : [WORD w] = [WORD w]