public class Parser extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Parser.Ctx
命名约定:0 - 表示起点,包含;1 - 表示终点,不含;
|
protected static class |
Parser.G |
| Modifier and Type | Field and Description |
|---|---|
protected static Exon |
DealText |
protected static org.slf4j.Logger |
logger |
protected static int |
RegxFlag |
protected static Exon |
SkipThis |
| Constructor and Description |
|---|
Parser() |
| Modifier and Type | Method and Description |
|---|---|
protected static Exon |
dealDnaBkb(Parser.Ctx ctx)
处理DNA:BKB,并决定是否停止后续处理
|
protected static Exon |
dealDnaEnd(Parser.Ctx ctx)
处理DNA:END,并决定是否停止后续处理
|
protected static @NotNull Exon |
dealDnaGroup(Parser.Ctx ctx)
处理 DNA 组
|
protected static Exon |
dealDnaRaw(Parser.Ctx ctx)
处理DNA:RAW,并决定是否停止后续处理
|
protected static Exon |
dealDnaSet(Parser.Ctx ctx)
处理DNA:SET,并决定是否停止后续处理
|
protected static Exon |
dealRnaDone(Parser.Ctx ctx)
处理RNA:DONE,并决定是否停止后续处理
|
protected static Exon |
dealRnaEach(Parser.Ctx ctx)
处理RNA:EACH,并决定是否停止后续处理
|
protected static Exon |
dealRnaElse(Parser.Ctx ctx)
处理RNA:ELSE,并决定是否停止后续处理
|
protected static @NotNull Exon |
dealRnaGroup(Parser.Ctx ctx)
处理 RNA 组
|
protected static Exon |
dealRnaPut(Parser.Ctx ctx)
处理RNA:PUT,并决定是否停止后续处理
|
protected static Exon |
dealRnaRun(Parser.Ctx ctx)
处理RNA:RUN,并决定是否停止后续处理
|
protected static Exon |
dealRnaUse(Parser.Ctx ctx)
处理RNA:USE,并决定是否停止后续处理
|
protected static Exon |
dealRnaWhen(Parser.Ctx ctx)
处理RNA:WHEN,并决定是否停止后续处理
|
protected static void |
dealTxtPlain(Parser.Ctx ctx,
int edge0,
Exon exon)
处理普通文本
|
protected static boolean |
findXnaGrp(Parser.Ctx ctx,
String token)
查找`DNA:`或`RNA:`,并返回查找到的3个值
|
protected static boolean |
markHiMeepo(Parser.Ctx ctx)
查找并处理meepo,是否停止后续处理
|
static Gene |
parse(String txt)
解析文本,严格模式。
|
static Gene |
parse(String txt,
boolean lax)
解析文本。发现指令的语法错误时,有放松模式(日志warn,并视为普通文本)和严格模式(抛异常)
|
protected static final org.slf4j.Logger logger
protected static final Exon SkipThis
protected static final Exon DealText
protected static final int RegxFlag
public static Gene parse(String txt, boolean lax)
txt - 文本lax - 放松模式@NotNull protected static @NotNull Exon dealDnaGroup(Parser.Ctx ctx)
ctx - 上下文@NotNull protected static @NotNull Exon dealRnaGroup(Parser.Ctx ctx)
ctx - 上下文protected static boolean markHiMeepo(Parser.Ctx ctx)
ctx - 上下文protected static void dealTxtPlain(Parser.Ctx ctx, int edge0, Exon exon)
ctx - 上下文edge0 - 左边缘exon - exonprotected static boolean findXnaGrp(Parser.Ctx ctx, String token)
ctx - 上下文token - 特征protected static Exon dealDnaRaw(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealDnaBkb(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealDnaEnd(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealDnaSet(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealRnaRun(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealRnaUse(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealRnaPut(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealRnaWhen(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealRnaEach(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealRnaElse(Parser.Ctx ctx)
ctx - 上下文protected static Exon dealRnaDone(Parser.Ctx ctx)
ctx - 上下文Copyright © 2020. All rights reserved.