Sorting out Parboiled issues. Initial parser draft complete.
* Created test script. * Created working parser.
This commit is contained in:
21
resources/main/test.groovy
Normal file
21
resources/main/test.groovy
Normal file
@ -0,0 +1,21 @@
|
||||
import com.jdblabs.jlp.JLPPegParser
|
||||
import org.parboiled.Parboiled
|
||||
import org.parboiled.parserunners.ReportingParseRunner
|
||||
import org.parboiled.parserunners.RecoveringParseRunner
|
||||
|
||||
parser = Parboiled.createParser(JLPPegParser.class)
|
||||
parseRunner = new RecoveringParseRunner(parser.CodePage())
|
||||
|
||||
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)
|
Reference in New Issue
Block a user