2011-08-25 22:08:55 +00:00
|
|
|
import com.jdblabs.jlp.JLPPegParser
|
|
|
|
import org.parboiled.Parboiled
|
|
|
|
import org.parboiled.parserunners.ReportingParseRunner
|
|
|
|
import org.parboiled.parserunners.RecoveringParseRunner
|
|
|
|
|
|
|
|
parser = Parboiled.createParser(JLPPegParser.class)
|
2011-08-26 20:40:56 +00:00
|
|
|
parseRunner = new RecoveringParseRunner(parser.SourceFile())
|
2011-08-25 22:08:55 +00:00
|
|
|
|
|
|
|
testLine = """%% This the first test line.
|
|
|
|
%% Second Line
|
|
|
|
%% Third Line
|
|
|
|
Fourth line
|
|
|
|
%% Fifth line
|
|
|
|
%% @author Sixth Line
|
|
|
|
%% @Example Seventh Line
|
|
|
|
%% Markdown lines (eigth line)
|
|
|
|
%% Still markdown (ninth line)
|
|
|
|
Tenth line is a code line
|
|
|
|
"""
|
|
|
|
|
|
|
|
result = parseRunner.run(testLine)
|