aboutsummaryrefslogtreecommitdiff
path: root/gen
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-12-15 20:54:16 +0300
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-12-15 20:54:16 +0300
commitc9ca0d86e810ac7240b249b145810f6862a58e93 (patch)
tree3ec593c2bcb6e54b9c5732b47445c5404caf09a1 /gen
parentbf6696b193d6a08d1d6c79d4c8e2a0564a286d7e (diff)
downloaddokka-c9ca0d86e810ac7240b249b145810f6862a58e93.tar.gz
dokka-c9ca0d86e810ac7240b249b145810f6862a58e93.tar.bz2
dokka-c9ca0d86e810ac7240b249b145810f6862a58e93.zip
Migrate to non-PsiBuilder fully-featured markdown parser.
Diffstat (limited to 'gen')
-rw-r--r--gen/org/jetbrains/markdown/MarkdownElementTypes.java49
-rw-r--r--gen/org/jetbrains/markdown/MarkdownParser.java1724
-rw-r--r--gen/org/jetbrains/markdown/lexer/JFlex.jarbin193380 -> 0 bytes
-rw-r--r--gen/org/jetbrains/markdown/lexer/MarkdownLexer.java9
-rw-r--r--gen/org/jetbrains/markdown/lexer/_MarkdownLexer.flex44
-rw-r--r--gen/org/jetbrains/markdown/lexer/_MarkdownLexer.java508
-rw-r--r--gen/org/jetbrains/markdown/lexer/idea-flex.skeleton251
7 files changed, 0 insertions, 2585 deletions
diff --git a/gen/org/jetbrains/markdown/MarkdownElementTypes.java b/gen/org/jetbrains/markdown/MarkdownElementTypes.java
deleted file mode 100644
index 5c4aad41..00000000
--- a/gen/org/jetbrains/markdown/MarkdownElementTypes.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// This is a generated file. Not intended for manual editing.
-package org.jetbrains.markdown;
-
-import com.intellij.psi.tree.IElementType;
-import org.jetbrains.dokka.Markdown.MarkdownTokenType;
-
-public interface MarkdownElementTypes {
-
- IElementType ANONYMOUS_SECTION = new IElementType("ANONYMOUS_SECTION", null);
- IElementType BLANK_LINE = new IElementType("BLANK_LINE", null);
- IElementType BLOCK = new IElementType("BLOCK", null);
- IElementType BULLET = new IElementType("BULLET", null);
- IElementType BULLET_LIST = new IElementType("BULLET_LIST", null);
- IElementType CODE = new IElementType("CODE", null);
- IElementType DIRECTIVE = new IElementType("DIRECTIVE", null);
- IElementType DIRECTIVE_NAME = new IElementType("DIRECTIVE_NAME", null);
- IElementType DIRECTIVE_PARAMS = new IElementType("DIRECTIVE_PARAMS", null);
- IElementType EMPH = new IElementType("EMPH", null);
- IElementType END_LINE = new IElementType("END_LINE", null);
- IElementType ENUMERATOR = new IElementType("ENUMERATOR", null);
- IElementType HORIZONTAL_RULE = new IElementType("HORIZONTAL_RULE", null);
- IElementType HREF = new IElementType("HREF", null);
- IElementType INLINE = new IElementType("INLINE", null);
- IElementType LINK = new IElementType("LINK", null);
- IElementType LIST_BLOCK = new IElementType("LIST_BLOCK", null);
- IElementType LIST_BLOCK_LINE = new IElementType("LIST_BLOCK_LINE", null);
- IElementType LIST_CONTINUATION_BLOCK = new IElementType("LIST_CONTINUATION_BLOCK", null);
- IElementType LIST_ITEM = new IElementType("LIST_ITEM", null);
- IElementType NAMED_SECTION = new IElementType("NAMED_SECTION", null);
- IElementType ORDERED_LIST = new IElementType("ORDERED_LIST", null);
- IElementType PARA = new IElementType("PARA", null);
- IElementType PLAIN_TEXT = new IElementType("PLAIN_TEXT", null);
- IElementType SECTION_BODY = new IElementType("SECTION_BODY", null);
- IElementType SECTION_NAME = new IElementType("SECTION_NAME", null);
- IElementType STRONG = new IElementType("STRONG", null);
- IElementType STRONG_STAR = new IElementType("STRONG_STAR", null);
- IElementType STRONG_UNDERSCORE = new IElementType("STRONG_UNDERSCORE", null);
- IElementType TARGET = new IElementType("TARGET", null);
- IElementType UNUSED = new IElementType("UNUSED", null);
- IElementType WHITESPACE = new IElementType("WHITESPACE", null);
-
- IElementType BOM = new MarkdownTokenType("BOM");
- IElementType EOL = new MarkdownTokenType("EOL");
- IElementType EOP = new MarkdownTokenType("EOP");
- IElementType NUMBER = new MarkdownTokenType("Number");
- IElementType SPACE = new MarkdownTokenType("Space");
- IElementType SPECIAL = new MarkdownTokenType("Special");
- IElementType WORD = new MarkdownTokenType("Word");
-}
diff --git a/gen/org/jetbrains/markdown/MarkdownParser.java b/gen/org/jetbrains/markdown/MarkdownParser.java
deleted file mode 100644
index 05a1ada8..00000000
--- a/gen/org/jetbrains/markdown/MarkdownParser.java
+++ /dev/null
@@ -1,1724 +0,0 @@
-// This is a generated file. Not intended for manual editing.
-package org.jetbrains.markdown;
-
-import com.intellij.lang.PsiBuilder;
-import com.intellij.lang.PsiBuilder.Marker;
-import static org.jetbrains.markdown.MarkdownElementTypes.*;
-import static org.jetbrains.dokka.Markdown.GeneratedParserUtilBase.*;
-import com.intellij.psi.tree.IElementType;
-import com.intellij.lang.ASTNode;
-import com.intellij.psi.tree.TokenSet;
-import com.intellij.lang.PsiParser;
-
-@SuppressWarnings({"SimplifiableIfStatement", "UnusedAssignment"})
-public class MarkdownParser implements PsiParser {
-
- public ASTNode parse(IElementType t, PsiBuilder b) {
- parse_only_(t, b);
- return b.getTreeBuilt();
- }
-
- public void parse_only_(IElementType t, PsiBuilder b) {
- boolean r;
- b = adapt_builder_(t, b, this, null);
- Marker m = enter_section_(b, 0, _COLLAPSE_, null);
- if (t == ANONYMOUS_SECTION) {
- r = AnonymousSection(b, 0);
- }
- else if (t == BLANK_LINE) {
- r = BlankLine(b, 0);
- }
- else if (t == BLOCK) {
- r = Block(b, 0);
- }
- else if (t == BULLET) {
- r = Bullet(b, 0);
- }
- else if (t == BULLET_LIST) {
- r = BulletList(b, 0);
- }
- else if (t == CODE) {
- r = Code(b, 0);
- }
- else if (t == DIRECTIVE) {
- r = Directive(b, 0);
- }
- else if (t == DIRECTIVE_NAME) {
- r = DirectiveName(b, 0);
- }
- else if (t == DIRECTIVE_PARAMS) {
- r = DirectiveParams(b, 0);
- }
- else if (t == EMPH) {
- r = Emph(b, 0);
- }
- else if (t == END_LINE) {
- r = EndLine(b, 0);
- }
- else if (t == ENUMERATOR) {
- r = Enumerator(b, 0);
- }
- else if (t == HORIZONTAL_RULE) {
- r = HorizontalRule(b, 0);
- }
- else if (t == HREF) {
- r = Href(b, 0);
- }
- else if (t == INLINE) {
- r = Inline(b, 0);
- }
- else if (t == LINK) {
- r = Link(b, 0);
- }
- else if (t == LIST_BLOCK) {
- r = ListBlock(b, 0);
- }
- else if (t == LIST_BLOCK_LINE) {
- r = ListBlockLine(b, 0);
- }
- else if (t == LIST_CONTINUATION_BLOCK) {
- r = ListContinuationBlock(b, 0);
- }
- else if (t == LIST_ITEM) {
- r = ListItem(b, 0);
- }
- else if (t == NAMED_SECTION) {
- r = NamedSection(b, 0);
- }
- else if (t == ORDERED_LIST) {
- r = OrderedList(b, 0);
- }
- else if (t == PARA) {
- r = Para(b, 0);
- }
- else if (t == PLAIN_TEXT) {
- r = PlainText(b, 0);
- }
- else if (t == SECTION_BODY) {
- r = SectionBody(b, 0);
- }
- else if (t == SECTION_NAME) {
- r = SectionName(b, 0);
- }
- else if (t == STRONG) {
- r = Strong(b, 0);
- }
- else if (t == STRONG_STAR) {
- r = StrongStar(b, 0);
- }
- else if (t == STRONG_UNDERSCORE) {
- r = StrongUnderscore(b, 0);
- }
- else if (t == TARGET) {
- r = Target(b, 0);
- }
- else if (t == UNUSED) {
- r = Unused(b, 0);
- }
- else if (t == WHITESPACE) {
- r = Whitespace(b, 0);
- }
- else {
- r = parse_root_(t, b, 0);
- }
- exit_section_(b, 0, m, t, r, true, TRUE_CONDITION);
- }
-
- protected boolean parse_root_(IElementType t, PsiBuilder b, int l) {
- return Document(b, l + 1);
- }
-
- /* ********************************************************** */
- // SectionBody
- public static boolean AnonymousSection(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "AnonymousSection")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<anonymous section>");
- r = SectionBody(b, l + 1);
- exit_section_(b, l, m, ANONYMOUS_SECTION, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // OptionalSpace EOL
- public static boolean BlankLine(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "BlankLine")) return false;
- if (!nextTokenIs(b, "<blank line>", EOL, SPACE)) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<blank line>");
- r = OptionalSpace(b, l + 1);
- r = r && consumeToken(b, EOL);
- exit_section_(b, l, m, BLANK_LINE, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // BlankLine* (
- // OrderedList
- // | BulletList
- // | HorizontalRule
- // | Directive
- // | Para
- // )
- public static boolean Block(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Block")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<block>");
- r = Block_0(b, l + 1);
- r = r && Block_1(b, l + 1);
- exit_section_(b, l, m, BLOCK, r, false, null);
- return r;
- }
-
- // BlankLine*
- private static boolean Block_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Block_0")) return false;
- int c = current_position_(b);
- while (true) {
- if (!BlankLine(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "Block_0", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // OrderedList
- // | BulletList
- // | HorizontalRule
- // | Directive
- // | Para
- private static boolean Block_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Block_1")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = OrderedList(b, l + 1);
- if (!r) r = BulletList(b, l + 1);
- if (!r) r = HorizontalRule(b, l + 1);
- if (!r) r = Directive(b, l + 1);
- if (!r) r = Para(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // !HorizontalRule NonindentSpace ('+' | '*' | '-') Space+
- public static boolean Bullet(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Bullet")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<bullet>");
- r = Bullet_0(b, l + 1);
- r = r && NonindentSpace(b, l + 1);
- r = r && Bullet_2(b, l + 1);
- r = r && Bullet_3(b, l + 1);
- exit_section_(b, l, m, BULLET, r, false, null);
- return r;
- }
-
- // !HorizontalRule
- private static boolean Bullet_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Bullet_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !HorizontalRule(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // '+' | '*' | '-'
- private static boolean Bullet_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Bullet_2")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "+");
- if (!r) r = consumeToken(b, "*");
- if (!r) r = consumeToken(b, "-");
- exit_section_(b, m, null, r);
- return r;
- }
-
- // Space+
- private static boolean Bullet_3(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Bullet_3")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, SPACE);
- int c = current_position_(b);
- while (r) {
- if (!consumeToken(b, SPACE)) break;
- if (!empty_element_parsed_guard_(b, "Bullet_3", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // &Bullet List
- public static boolean BulletList(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "BulletList")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<bullet list>");
- r = BulletList_0(b, l + 1);
- r = r && List(b, l + 1);
- exit_section_(b, l, m, BULLET_LIST, r, false, null);
- return r;
- }
-
- // &Bullet
- private static boolean BulletList_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "BulletList_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _AND_, null);
- r = Bullet(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // '`' !Whitespace (!'`' Inline)+ '`'
- public static boolean Code(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Code")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<code>");
- r = consumeToken(b, "`");
- r = r && Code_1(b, l + 1);
- r = r && Code_2(b, l + 1);
- r = r && consumeToken(b, "`");
- exit_section_(b, l, m, CODE, r, false, null);
- return r;
- }
-
- // !Whitespace
- private static boolean Code_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Code_1")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !Whitespace(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // (!'`' Inline)+
- private static boolean Code_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Code_2")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Code_2_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!Code_2_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "Code_2", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'`' Inline
- private static boolean Code_2_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Code_2_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Code_2_0_0(b, l + 1);
- r = r && Inline(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'`'
- private static boolean Code_2_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Code_2_0_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !consumeToken(b, "`");
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // '{' DirectiveName Space+ DirectiveParams '}'
- public static boolean Directive(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Directive")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<directive>");
- r = consumeToken(b, "{");
- r = r && DirectiveName(b, l + 1);
- r = r && Directive_2(b, l + 1);
- r = r && DirectiveParams(b, l + 1);
- r = r && consumeToken(b, "}");
- exit_section_(b, l, m, DIRECTIVE, r, false, null);
- return r;
- }
-
- // Space+
- private static boolean Directive_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Directive_2")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, SPACE);
- int c = current_position_(b);
- while (r) {
- if (!consumeToken(b, SPACE)) break;
- if (!empty_element_parsed_guard_(b, "Directive_2", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // Word
- public static boolean DirectiveName(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "DirectiveName")) return false;
- if (!nextTokenIs(b, WORD)) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, WORD);
- exit_section_(b, m, DIRECTIVE_NAME, r);
- return r;
- }
-
- /* ********************************************************** */
- // PlainText
- public static boolean DirectiveParams(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "DirectiveParams")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<directive params>");
- r = PlainText(b, l + 1);
- exit_section_(b, l, m, DIRECTIVE_PARAMS, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // BOM? Whitespace* AnonymousSection? (Whitespace* NamedSection)*
- static boolean Document(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Document")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Document_0(b, l + 1);
- r = r && Document_1(b, l + 1);
- r = r && Document_2(b, l + 1);
- r = r && Document_3(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // BOM?
- private static boolean Document_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Document_0")) return false;
- consumeToken(b, BOM);
- return true;
- }
-
- // Whitespace*
- private static boolean Document_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Document_1")) return false;
- int c = current_position_(b);
- while (true) {
- if (!Whitespace(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "Document_1", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // AnonymousSection?
- private static boolean Document_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Document_2")) return false;
- AnonymousSection(b, l + 1);
- return true;
- }
-
- // (Whitespace* NamedSection)*
- private static boolean Document_3(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Document_3")) return false;
- int c = current_position_(b);
- while (true) {
- if (!Document_3_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "Document_3", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // Whitespace* NamedSection
- private static boolean Document_3_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Document_3_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Document_3_0_0(b, l + 1);
- r = r && NamedSection(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // Whitespace*
- private static boolean Document_3_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Document_3_0_0")) return false;
- int c = current_position_(b);
- while (true) {
- if (!Whitespace(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "Document_3_0_0", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- /* ********************************************************** */
- // EmphStar | EmphUnderscore
- public static boolean Emph(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Emph")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<emph>");
- r = EmphStar(b, l + 1);
- if (!r) r = EmphUnderscore(b, l + 1);
- exit_section_(b, l, m, EMPH, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // '*' !Whitespace (!'*' Inline)+ '*'
- static boolean EmphStar(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphStar")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "*");
- r = r && EmphStar_1(b, l + 1);
- r = r && EmphStar_2(b, l + 1);
- r = r && consumeToken(b, "*");
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !Whitespace
- private static boolean EmphStar_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphStar_1")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !Whitespace(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // (!'*' Inline)+
- private static boolean EmphStar_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphStar_2")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = EmphStar_2_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!EmphStar_2_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "EmphStar_2", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'*' Inline
- private static boolean EmphStar_2_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphStar_2_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = EmphStar_2_0_0(b, l + 1);
- r = r && Inline(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'*'
- private static boolean EmphStar_2_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphStar_2_0_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !consumeToken(b, "*");
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // '_' !Whitespace (!'_' Inline)+ '_'
- static boolean EmphUnderscore(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphUnderscore")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "_");
- r = r && EmphUnderscore_1(b, l + 1);
- r = r && EmphUnderscore_2(b, l + 1);
- r = r && consumeToken(b, "_");
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !Whitespace
- private static boolean EmphUnderscore_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphUnderscore_1")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !Whitespace(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // (!'_' Inline)+
- private static boolean EmphUnderscore_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphUnderscore_2")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = EmphUnderscore_2_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!EmphUnderscore_2_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "EmphUnderscore_2", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'_' Inline
- private static boolean EmphUnderscore_2_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphUnderscore_2_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = EmphUnderscore_2_0_0(b, l + 1);
- r = r && Inline(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'_'
- private static boolean EmphUnderscore_2_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EmphUnderscore_2_0_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !consumeToken(b, "_");
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // TerminalEndline | NormalEndline
- public static boolean EndLine(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "EndLine")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<end line>");
- r = TerminalEndline(b, l + 1);
- if (!r) r = NormalEndline(b, l + 1);
- exit_section_(b, l, m, END_LINE, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // NonindentSpace Number '.' Space+
- public static boolean Enumerator(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Enumerator")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<enumerator>");
- r = NonindentSpace(b, l + 1);
- r = r && consumeToken(b, NUMBER);
- r = r && consumeToken(b, ".");
- r = r && Enumerator_3(b, l + 1);
- exit_section_(b, l, m, ENUMERATOR, r, false, null);
- return r;
- }
-
- // Space+
- private static boolean Enumerator_3(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Enumerator_3")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, SPACE);
- int c = current_position_(b);
- while (r) {
- if (!consumeToken(b, SPACE)) break;
- if (!empty_element_parsed_guard_(b, "Enumerator_3", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // NonindentSpace
- // ( '*' OptionalSpace '*' OptionalSpace '*' (OptionalSpace '*')*
- // | '-' OptionalSpace '-' OptionalSpace '-' (OptionalSpace '-')*
- // | '_' OptionalSpace '_' OptionalSpace '_' (OptionalSpace '_')*)
- // OptionalSpace EOL BlankLine+
- public static boolean HorizontalRule(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<horizontal rule>");
- r = NonindentSpace(b, l + 1);
- r = r && HorizontalRule_1(b, l + 1);
- r = r && OptionalSpace(b, l + 1);
- r = r && consumeToken(b, EOL);
- r = r && HorizontalRule_4(b, l + 1);
- exit_section_(b, l, m, HORIZONTAL_RULE, r, false, null);
- return r;
- }
-
- // '*' OptionalSpace '*' OptionalSpace '*' (OptionalSpace '*')*
- // | '-' OptionalSpace '-' OptionalSpace '-' (OptionalSpace '-')*
- // | '_' OptionalSpace '_' OptionalSpace '_' (OptionalSpace '_')*
- private static boolean HorizontalRule_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = HorizontalRule_1_0(b, l + 1);
- if (!r) r = HorizontalRule_1_1(b, l + 1);
- if (!r) r = HorizontalRule_1_2(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // '*' OptionalSpace '*' OptionalSpace '*' (OptionalSpace '*')*
- private static boolean HorizontalRule_1_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "*");
- r = r && OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "*");
- r = r && OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "*");
- r = r && HorizontalRule_1_0_5(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // (OptionalSpace '*')*
- private static boolean HorizontalRule_1_0_5(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1_0_5")) return false;
- int c = current_position_(b);
- while (true) {
- if (!HorizontalRule_1_0_5_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "HorizontalRule_1_0_5", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // OptionalSpace '*'
- private static boolean HorizontalRule_1_0_5_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1_0_5_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "*");
- exit_section_(b, m, null, r);
- return r;
- }
-
- // '-' OptionalSpace '-' OptionalSpace '-' (OptionalSpace '-')*
- private static boolean HorizontalRule_1_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1_1")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "-");
- r = r && OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "-");
- r = r && OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "-");
- r = r && HorizontalRule_1_1_5(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // (OptionalSpace '-')*
- private static boolean HorizontalRule_1_1_5(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1_1_5")) return false;
- int c = current_position_(b);
- while (true) {
- if (!HorizontalRule_1_1_5_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "HorizontalRule_1_1_5", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // OptionalSpace '-'
- private static boolean HorizontalRule_1_1_5_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1_1_5_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "-");
- exit_section_(b, m, null, r);
- return r;
- }
-
- // '_' OptionalSpace '_' OptionalSpace '_' (OptionalSpace '_')*
- private static boolean HorizontalRule_1_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1_2")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "_");
- r = r && OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "_");
- r = r && OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "_");
- r = r && HorizontalRule_1_2_5(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // (OptionalSpace '_')*
- private static boolean HorizontalRule_1_2_5(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1_2_5")) return false;
- int c = current_position_(b);
- while (true) {
- if (!HorizontalRule_1_2_5_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "HorizontalRule_1_2_5", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // OptionalSpace '_'
- private static boolean HorizontalRule_1_2_5_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_1_2_5_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "_");
- exit_section_(b, m, null, r);
- return r;
- }
-
- // BlankLine+
- private static boolean HorizontalRule_4(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "HorizontalRule_4")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = BlankLine(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!BlankLine(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "HorizontalRule_4", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // (Word | Number | ':' | '/')+
- public static boolean Href(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Href")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<href>");
- r = Href_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!Href_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "Href", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, l, m, HREF, r, false, null);
- return r;
- }
-
- // Word | Number | ':' | '/'
- private static boolean Href_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Href_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, WORD);
- if (!r) r = consumeToken(b, NUMBER);
- if (!r) r = consumeToken(b, ":");
- if (!r) r = consumeToken(b, "/");
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // "\t" | " "
- static boolean Indent(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Indent")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "\t");
- if (!r) r = consumeToken(b, " ");
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // Strong | Emph | Code | Link | PlainText
- public static boolean Inline(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Inline")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<inline>");
- r = Strong(b, l + 1);
- if (!r) r = Emph(b, l + 1);
- if (!r) r = Code(b, l + 1);
- if (!r) r = Link(b, l + 1);
- if (!r) r = PlainText(b, l + 1);
- exit_section_(b, l, m, INLINE, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // (!EndLine Inline | EndLine &Inline )+ EndLine?
- static boolean Inlines(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Inlines")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Inlines_0(b, l + 1);
- r = r && Inlines_1(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // (!EndLine Inline | EndLine &Inline )+
- private static boolean Inlines_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Inlines_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Inlines_0_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!Inlines_0_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "Inlines_0", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !EndLine Inline | EndLine &Inline
- private static boolean Inlines_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Inlines_0_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Inlines_0_0_0(b, l + 1);
- if (!r) r = Inlines_0_0_1(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !EndLine Inline
- private static boolean Inlines_0_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Inlines_0_0_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Inlines_0_0_0_0(b, l + 1);
- r = r && Inline(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !EndLine
- private static boolean Inlines_0_0_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Inlines_0_0_0_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !EndLine(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // EndLine &Inline
- private static boolean Inlines_0_0_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Inlines_0_0_1")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = EndLine(b, l + 1);
- r = r && Inlines_0_0_1_1(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // &Inline
- private static boolean Inlines_0_0_1_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Inlines_0_0_1_1")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _AND_, null);
- r = Inline(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // EndLine?
- private static boolean Inlines_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Inlines_1")) return false;
- EndLine(b, l + 1);
- return true;
- }
-
- /* ********************************************************** */
- // '[' Target ']' ('(' Href ')')?
- public static boolean Link(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Link")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<link>");
- r = consumeToken(b, "[");
- r = r && Target(b, l + 1);
- r = r && consumeToken(b, "]");
- r = r && Link_3(b, l + 1);
- exit_section_(b, l, m, LINK, r, false, null);
- return r;
- }
-
- // ('(' Href ')')?
- private static boolean Link_3(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Link_3")) return false;
- Link_3_0(b, l + 1);
- return true;
- }
-
- // '(' Href ')'
- private static boolean Link_3_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Link_3_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "(");
- r = r && Href(b, l + 1);
- r = r && consumeToken(b, ")");
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // (ListItem BlankLine*)+
- static boolean List(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "List")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = List_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!List_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "List", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- // ListItem BlankLine*
- private static boolean List_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "List_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = ListItem(b, l + 1);
- r = r && List_0_1(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // BlankLine*
- private static boolean List_0_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "List_0_1")) return false;
- int c = current_position_(b);
- while (true) {
- if (!BlankLine(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "List_0_1", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- /* ********************************************************** */
- // !BlankLine Inlines ( ListBlockLine )*
- public static boolean ListBlock(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlock")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<list block>");
- r = ListBlock_0(b, l + 1);
- r = r && Inlines(b, l + 1);
- r = r && ListBlock_2(b, l + 1);
- exit_section_(b, l, m, LIST_BLOCK, r, false, null);
- return r;
- }
-
- // !BlankLine
- private static boolean ListBlock_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlock_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !BlankLine(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // ( ListBlockLine )*
- private static boolean ListBlock_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlock_2")) return false;
- int c = current_position_(b);
- while (true) {
- if (!ListBlock_2_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "ListBlock_2", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // ( ListBlockLine )
- private static boolean ListBlock_2_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlock_2_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = ListBlockLine(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // !BlankLine !(Indent? (Bullet | Enumerator)) !HorizontalRule Indent? Inlines
- public static boolean ListBlockLine(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlockLine")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<list block line>");
- r = ListBlockLine_0(b, l + 1);
- r = r && ListBlockLine_1(b, l + 1);
- r = r && ListBlockLine_2(b, l + 1);
- r = r && ListBlockLine_3(b, l + 1);
- r = r && Inlines(b, l + 1);
- exit_section_(b, l, m, LIST_BLOCK_LINE, r, false, null);
- return r;
- }
-
- // !BlankLine
- private static boolean ListBlockLine_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlockLine_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !BlankLine(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // !(Indent? (Bullet | Enumerator))
- private static boolean ListBlockLine_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlockLine_1")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !ListBlockLine_1_0(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // Indent? (Bullet | Enumerator)
- private static boolean ListBlockLine_1_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlockLine_1_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = ListBlockLine_1_0_0(b, l + 1);
- r = r && ListBlockLine_1_0_1(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // Indent?
- private static boolean ListBlockLine_1_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlockLine_1_0_0")) return false;
- Indent(b, l + 1);
- return true;
- }
-
- // Bullet | Enumerator
- private static boolean ListBlockLine_1_0_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlockLine_1_0_1")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Bullet(b, l + 1);
- if (!r) r = Enumerator(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !HorizontalRule
- private static boolean ListBlockLine_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlockLine_2")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !HorizontalRule(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // Indent?
- private static boolean ListBlockLine_3(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListBlockLine_3")) return false;
- Indent(b, l + 1);
- return true;
- }
-
- /* ********************************************************** */
- // BlankLine* (Indent ListBlock)+
- public static boolean ListContinuationBlock(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListContinuationBlock")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<list continuation block>");
- r = ListContinuationBlock_0(b, l + 1);
- r = r && ListContinuationBlock_1(b, l + 1);
- exit_section_(b, l, m, LIST_CONTINUATION_BLOCK, r, false, null);
- return r;
- }
-
- // BlankLine*
- private static boolean ListContinuationBlock_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListContinuationBlock_0")) return false;
- int c = current_position_(b);
- while (true) {
- if (!BlankLine(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "ListContinuationBlock_0", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // (Indent ListBlock)+
- private static boolean ListContinuationBlock_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListContinuationBlock_1")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = ListContinuationBlock_1_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!ListContinuationBlock_1_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "ListContinuationBlock_1", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- // Indent ListBlock
- private static boolean ListContinuationBlock_1_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListContinuationBlock_1_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Indent(b, l + 1);
- r = r && ListBlock(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // (Bullet | Enumerator) ListBlock ( ListContinuationBlock )*
- public static boolean ListItem(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListItem")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<list item>");
- r = ListItem_0(b, l + 1);
- r = r && ListBlock(b, l + 1);
- r = r && ListItem_2(b, l + 1);
- exit_section_(b, l, m, LIST_ITEM, r, false, null);
- return r;
- }
-
- // Bullet | Enumerator
- private static boolean ListItem_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListItem_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Bullet(b, l + 1);
- if (!r) r = Enumerator(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // ( ListContinuationBlock )*
- private static boolean ListItem_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListItem_2")) return false;
- int c = current_position_(b);
- while (true) {
- if (!ListItem_2_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "ListItem_2", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // ( ListContinuationBlock )
- private static boolean ListItem_2_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "ListItem_2_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = ListContinuationBlock(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // SectionHeader SectionBody
- public static boolean NamedSection(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "NamedSection")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<named section>");
- r = SectionHeader(b, l + 1);
- r = r && SectionBody(b, l + 1);
- exit_section_(b, l, m, NAMED_SECTION, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // (" " | " " | " ")?
- static boolean NonindentSpace(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "NonindentSpace")) return false;
- NonindentSpace_0(b, l + 1);
- return true;
- }
-
- // " " | " " | " "
- private static boolean NonindentSpace_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "NonindentSpace_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, " ");
- if (!r) r = consumeToken(b, " ");
- if (!r) r = consumeToken(b, " ");
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // EOL !BlankLine
- static boolean NormalEndline(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "NormalEndline")) return false;
- if (!nextTokenIs(b, EOL)) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, EOL);
- r = r && NormalEndline_1(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !BlankLine
- private static boolean NormalEndline_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "NormalEndline_1")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !BlankLine(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // Space*
- static boolean OptionalSpace(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "OptionalSpace")) return false;
- int c = current_position_(b);
- while (true) {
- if (!consumeToken(b, SPACE)) break;
- if (!empty_element_parsed_guard_(b, "OptionalSpace", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- /* ********************************************************** */
- // &Enumerator List
- public static boolean OrderedList(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "OrderedList")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<ordered list>");
- r = OrderedList_0(b, l + 1);
- r = r && List(b, l + 1);
- exit_section_(b, l, m, ORDERED_LIST, r, false, null);
- return r;
- }
-
- // &Enumerator
- private static boolean OrderedList_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "OrderedList_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _AND_, null);
- r = Enumerator(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // Inlines (EOP | Space* <<eof>>)?
- public static boolean Para(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Para")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<para>");
- r = Inlines(b, l + 1);
- r = r && Para_1(b, l + 1);
- exit_section_(b, l, m, PARA, r, false, null);
- return r;
- }
-
- // (EOP | Space* <<eof>>)?
- private static boolean Para_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Para_1")) return false;
- Para_1_0(b, l + 1);
- return true;
- }
-
- // EOP | Space* <<eof>>
- private static boolean Para_1_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Para_1_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, EOP);
- if (!r) r = Para_1_0_1(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // Space* <<eof>>
- private static boolean Para_1_0_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Para_1_0_1")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = Para_1_0_1_0(b, l + 1);
- r = r && eof(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // Space*
- private static boolean Para_1_0_1_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Para_1_0_1_0")) return false;
- int c = current_position_(b);
- while (true) {
- if (!consumeToken(b, SPACE)) break;
- if (!empty_element_parsed_guard_(b, "Para_1_0_1_0", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- /* ********************************************************** */
- // (Word | Number | Space | ':')+
- public static boolean PlainText(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "PlainText")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<plain text>");
- r = PlainText_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!PlainText_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "PlainText", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, l, m, PLAIN_TEXT, r, false, null);
- return r;
- }
-
- // Word | Number | Space | ':'
- private static boolean PlainText_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "PlainText_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, WORD);
- if (!r) r = consumeToken(b, NUMBER);
- if (!r) r = consumeToken(b, SPACE);
- if (!r) r = consumeToken(b, ":");
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // Block*
- public static boolean SectionBody(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "SectionBody")) return false;
- Marker m = enter_section_(b, l, _NONE_, "<section body>");
- int c = current_position_(b);
- while (true) {
- if (!Block(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "SectionBody", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, l, m, SECTION_BODY, true, false, null);
- return true;
- }
-
- /* ********************************************************** */
- // '$' SectionName OptionalSpace ':' OptionalSpace
- static boolean SectionHeader(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "SectionHeader")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "$");
- r = r && SectionName(b, l + 1);
- r = r && OptionalSpace(b, l + 1);
- r = r && consumeToken(b, ":");
- r = r && OptionalSpace(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // SectionNameStart | '{' OptionalSpace SectionNameStart (Space+ Word)* OptionalSpace '}'
- public static boolean SectionName(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "SectionName")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<section name>");
- r = SectionNameStart(b, l + 1);
- if (!r) r = SectionName_1(b, l + 1);
- exit_section_(b, l, m, SECTION_NAME, r, false, null);
- return r;
- }
-
- // '{' OptionalSpace SectionNameStart (Space+ Word)* OptionalSpace '}'
- private static boolean SectionName_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "SectionName_1")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, "{");
- r = r && OptionalSpace(b, l + 1);
- r = r && SectionNameStart(b, l + 1);
- r = r && SectionName_1_3(b, l + 1);
- r = r && OptionalSpace(b, l + 1);
- r = r && consumeToken(b, "}");
- exit_section_(b, m, null, r);
- return r;
- }
-
- // (Space+ Word)*
- private static boolean SectionName_1_3(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "SectionName_1_3")) return false;
- int c = current_position_(b);
- while (true) {
- if (!SectionName_1_3_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "SectionName_1_3", c)) break;
- c = current_position_(b);
- }
- return true;
- }
-
- // Space+ Word
- private static boolean SectionName_1_3_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "SectionName_1_3_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = SectionName_1_3_0_0(b, l + 1);
- r = r && consumeToken(b, WORD);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // Space+
- private static boolean SectionName_1_3_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "SectionName_1_3_0_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, SPACE);
- int c = current_position_(b);
- while (r) {
- if (!consumeToken(b, SPACE)) break;
- if (!empty_element_parsed_guard_(b, "SectionName_1_3_0_0", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // '$'? Word
- static boolean SectionNameStart(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "SectionNameStart")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = SectionNameStart_0(b, l + 1);
- r = r && consumeToken(b, WORD);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // '$'?
- private static boolean SectionNameStart_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "SectionNameStart_0")) return false;
- consumeToken(b, "$");
- return true;
- }
-
- /* ********************************************************** */
- // StrongStar | StrongUnderscore
- public static boolean Strong(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Strong")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<strong>");
- r = StrongStar(b, l + 1);
- if (!r) r = StrongUnderscore(b, l + 1);
- exit_section_(b, l, m, STRONG, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // '**' !Whitespace (!'**' Inline)+ '**'
- public static boolean StrongStar(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongStar")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<strong star>");
- r = consumeToken(b, "**");
- r = r && StrongStar_1(b, l + 1);
- r = r && StrongStar_2(b, l + 1);
- r = r && consumeToken(b, "**");
- exit_section_(b, l, m, STRONG_STAR, r, false, null);
- return r;
- }
-
- // !Whitespace
- private static boolean StrongStar_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongStar_1")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !Whitespace(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // (!'**' Inline)+
- private static boolean StrongStar_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongStar_2")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = StrongStar_2_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!StrongStar_2_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "StrongStar_2", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'**' Inline
- private static boolean StrongStar_2_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongStar_2_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = StrongStar_2_0_0(b, l + 1);
- r = r && Inline(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'**'
- private static boolean StrongStar_2_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongStar_2_0_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !consumeToken(b, "**");
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // '__' !Whitespace (!'__' Inline)+ '__'
- public static boolean StrongUnderscore(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongUnderscore")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<strong underscore>");
- r = consumeToken(b, "__");
- r = r && StrongUnderscore_1(b, l + 1);
- r = r && StrongUnderscore_2(b, l + 1);
- r = r && consumeToken(b, "__");
- exit_section_(b, l, m, STRONG_UNDERSCORE, r, false, null);
- return r;
- }
-
- // !Whitespace
- private static boolean StrongUnderscore_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongUnderscore_1")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !Whitespace(b, l + 1);
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- // (!'__' Inline)+
- private static boolean StrongUnderscore_2(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongUnderscore_2")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = StrongUnderscore_2_0(b, l + 1);
- int c = current_position_(b);
- while (r) {
- if (!StrongUnderscore_2_0(b, l + 1)) break;
- if (!empty_element_parsed_guard_(b, "StrongUnderscore_2", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'__' Inline
- private static boolean StrongUnderscore_2_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongUnderscore_2_0")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = StrongUnderscore_2_0_0(b, l + 1);
- r = r && Inline(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- // !'__'
- private static boolean StrongUnderscore_2_0_0(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "StrongUnderscore_2_0_0")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NOT_, null);
- r = !consumeToken(b, "__");
- exit_section_(b, l, m, null, r, false, null);
- return r;
- }
-
- /* ********************************************************** */
- // Word+
- public static boolean Target(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Target")) return false;
- if (!nextTokenIs(b, WORD)) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, WORD);
- int c = current_position_(b);
- while (r) {
- if (!consumeToken(b, WORD)) break;
- if (!empty_element_parsed_guard_(b, "Target", c)) break;
- c = current_position_(b);
- }
- exit_section_(b, m, TARGET, r);
- return r;
- }
-
- /* ********************************************************** */
- // OptionalSpace <<eof>>
- static boolean TerminalEndline(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "TerminalEndline")) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = OptionalSpace(b, l + 1);
- r = r && eof(b, l + 1);
- exit_section_(b, m, null, r);
- return r;
- }
-
- /* ********************************************************** */
- // Special
- public static boolean Unused(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Unused")) return false;
- if (!nextTokenIs(b, SPECIAL)) return false;
- boolean r;
- Marker m = enter_section_(b);
- r = consumeToken(b, SPECIAL);
- exit_section_(b, m, UNUSED, r);
- return r;
- }
-
- /* ********************************************************** */
- // Space | EOL | EOP
- public static boolean Whitespace(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "Whitespace")) return false;
- boolean r;
- Marker m = enter_section_(b, l, _NONE_, "<whitespace>");
- r = consumeToken(b, SPACE);
- if (!r) r = consumeToken(b, EOL);
- if (!r) r = consumeToken(b, EOP);
- exit_section_(b, l, m, WHITESPACE, r, false, null);
- return r;
- }
-
-}
diff --git a/gen/org/jetbrains/markdown/lexer/JFlex.jar b/gen/org/jetbrains/markdown/lexer/JFlex.jar
deleted file mode 100644
index 8bef2fdb..00000000
--- a/gen/org/jetbrains/markdown/lexer/JFlex.jar
+++ /dev/null
Binary files differ
diff --git a/gen/org/jetbrains/markdown/lexer/MarkdownLexer.java b/gen/org/jetbrains/markdown/lexer/MarkdownLexer.java
deleted file mode 100644
index 40728972..00000000
--- a/gen/org/jetbrains/markdown/lexer/MarkdownLexer.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.jetbrains.markdown.lexer;
-
-import com.intellij.lexer.FlexAdapter;
-
-public class MarkdownLexer extends FlexAdapter {
- public MarkdownLexer() {
- super(new _MarkdownLexer());
- }
-}
diff --git a/gen/org/jetbrains/markdown/lexer/_MarkdownLexer.flex b/gen/org/jetbrains/markdown/lexer/_MarkdownLexer.flex
deleted file mode 100644
index b4c5c9a7..00000000
--- a/gen/org/jetbrains/markdown/lexer/_MarkdownLexer.flex
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.jetbrains.markdown.lexer;
-
-import com.intellij.lexer.*;
-import com.intellij.psi.tree.IElementType;
-import static org.jetbrains.markdown.MarkdownElementTypes.*;
-
-%%
-
-%{
- public _MarkdownLexer() {
- this((java.io.Reader)null);
- }
-%}
-
-%public
-%class _MarkdownLexer
-%implements FlexLexer
-%function advance
-%type IElementType
-%unicode
-
-LineTerminator = \r|\n|\r\n
-Word = {Letter}+
-Number = [:digit:]+
-Space = [ \t\f]
-Letter = [^~:{}$\*_`&\[\]()<!#\\ \t\n\r]
-Special = [~:{}$\*_`&\[\]()<!#\\ \t\n\r]
-EOL = {Space}* {LineTerminator}
-EOP = {Space}* {LineTerminator} {Space}* {LineTerminator}
-
-%%
-<YYINITIAL> {
- {Space} { return SPACE; }
- {EOP} { return EOP; }
- {EOL} { return EOL; }
- "\\357\\273\\277" { return BOM; }
-
- {Number} { return NUMBER; }
-
- {Special} { return SPECIAL; }
- {Word} { return WORD; }
-
- [^] { return com.intellij.psi.TokenType.BAD_CHARACTER; }
-}
diff --git a/gen/org/jetbrains/markdown/lexer/_MarkdownLexer.java b/gen/org/jetbrains/markdown/lexer/_MarkdownLexer.java
deleted file mode 100644
index 086512a1..00000000
--- a/gen/org/jetbrains/markdown/lexer/_MarkdownLexer.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/* The following code was generated by JFlex 1.4.3 on 9/29/14 10:13 PM */
-
-package org.jetbrains.markdown.lexer;
-
-import com.intellij.lexer.*;
-import com.intellij.psi.tree.IElementType;
-import static org.jetbrains.markdown.MarkdownElementTypes.*;
-
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
- * on 9/29/14 10:13 PM from the specification file
- * <tt>/Users/orangy/Projects/dokka/gen/org/jetbrains/markdown/lexer/_MarkdownLexer.flex</tt>
- */
-public class _MarkdownLexer implements FlexLexer {
- /** initial size of the lookahead buffer */
- private static final int ZZ_BUFFERSIZE = 16384;
-
- /** lexical states */
- public static final int YYINITIAL = 0;
-
- /**
- * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
- * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
- * at the beginning of a line
- * l is of the form l = 2*k, k a non negative integer
- */
- private static final int ZZ_LEXSTATE[] = {
- 0, 0
- };
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\0\1\6\1\2\1\0\1\4\1\1\22\0\1\6\1\5\1\0"+
- "\2\5\1\0\1\5\1\0\3\5\5\0\2\3\1\13\1\10\1\3"+
- "\1\11\1\3\1\12\2\3\1\5\1\0\1\5\36\0\1\5\1\7"+
- "\1\5\1\0\2\5\32\0\1\5\1\0\2\5\u05e1\0\12\3\206\0"+
- "\12\3\u026c\0\12\3\166\0\12\3\166\0\12\3\166\0\12\3\166\0"+
- "\12\3\167\0\11\3\166\0\12\3\166\0\12\3\166\0\12\3\340\0"+
- "\12\3\166\0\12\3\106\0\12\3\u0116\0\12\3\u031f\0\11\3\u046e\0"+
- "\12\3\46\0\12\3\u012c\0\12\3\ue5c0\0\12\3\346\0";
-
- /**
- * Translates characters to character classes
- */
- private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
-
- /**
- * Translates DFA states to action switch labels.
- */
- private static final int [] ZZ_ACTION = zzUnpackAction();
-
- private static final String ZZ_ACTION_PACKED_0 =
- "\1\0\1\1\2\2\1\3\1\4\1\5\1\4\1\5"+
- "\2\6\1\0\1\6\1\1\13\0\1\7";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[26];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackAction(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
-
- /**
- * Translates a state to a row index in the transition table
- */
- private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
-
- private static final String ZZ_ROWMAP_PACKED_0 =
- "\0\0\0\14\0\30\0\44\0\60\0\74\0\110\0\124"+
- "\0\140\0\154\0\44\0\44\0\110\0\74\0\124\0\170"+
- "\0\204\0\220\0\234\0\250\0\264\0\300\0\314\0\330"+
- "\0\344\0\110";
-
- private static int [] zzUnpackRowMap() {
- int [] result = new int[26];
- int offset = 0;
- offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackRowMap(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int high = packed.charAt(i++) << 16;
- result[j++] = high | packed.charAt(i++);
- }
- return j;
- }
-
- /**
- * The transition table of the DFA
- */
- private static final int [] ZZ_TRANS = zzUnpackTrans();
-
- private static final String ZZ_TRANS_PACKED_0 =
- "\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11"+
- "\4\5\1\2\2\0\2\2\3\0\4\2\1\0\1\12"+
- "\1\13\1\0\1\14\1\0\1\14\6\0\1\12\1\15"+
- "\1\0\1\14\1\0\1\14\5\0\1\2\2\0\1\5"+
- "\1\2\3\0\4\5\1\2\1\3\1\4\1\2\1\16"+
- "\1\0\1\17\1\0\4\2\15\0\1\3\1\4\1\0"+
- "\1\17\1\0\1\17\15\0\1\20\5\0\1\15\22\0"+
- "\1\21\14\0\1\22\10\0\1\23\17\0\1\24\12\0"+
- "\1\25\11\0\1\26\12\0\1\27\17\0\1\30\12\0"+
- "\1\31\13\0\1\32\1\0";
-
- private static int [] zzUnpackTrans() {
- int [] result = new int[240];
- int offset = 0;
- offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackTrans(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- value--;
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
-
- /* error codes */
- private static final int ZZ_UNKNOWN_ERROR = 0;
- private static final int ZZ_NO_MATCH = 1;
- private static final int ZZ_PUSHBACK_2BIG = 2;
- private static final char[] EMPTY_BUFFER = new char[0];
- private static final int YYEOF = -1;
- private static java.io.Reader zzReader = null; // Fake
-
- /* error messages for the codes above */
- private static final String ZZ_ERROR_MSG[] = {
- "Unkown internal scanner error",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
- /**
- * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
- */
- private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
-
- private static final String ZZ_ATTRIBUTE_PACKED_0 =
- "\1\0\5\1\1\11\4\1\1\0\1\11\1\1\13\0"+
- "\1\11";
-
- private static int [] zzUnpackAttribute() {
- int [] result = new int[26];
- int offset = 0;
- offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackAttribute(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
- /** the current state of the DFA */
- private int zzState;
-
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private CharSequence zzBuffer = "";
-
- /** this buffer may contains the current text array to be matched when it is cheap to acquire it */
- private char[] zzBufferArray;
-
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int zzPushbackPos;
-
- /** the current text position in the buffer */
- private int zzCurrentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
-
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
-
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
-
- /* user code: */
- public _MarkdownLexer() {
- this((java.io.Reader)null);
- }
-
-
- public _MarkdownLexer(java.io.Reader in) {
- this.zzReader = in;
- }
-
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public _MarkdownLexer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed the packed character translation table
- * @return the unpacked character translation table
- */
- private static char [] zzUnpackCMap(String packed) {
- char [] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 156) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do map[j++] = value; while (--count > 0);
- }
- return map;
- }
-
- public final int getTokenStart(){
- return zzStartRead;
- }
-
- public final int getTokenEnd(){
- return getTokenStart() + yylength();
- }
-
- public void reset(CharSequence buffer, int start, int end,int initialState){
- zzBuffer = buffer;
- zzBufferArray = com.intellij.util.text.CharArrayUtil.fromSequenceWithoutCopying(buffer);
- zzCurrentPos = zzMarkedPos = zzStartRead = start;
- zzPushbackPos = 0;
- zzAtEOF = false;
- zzAtBOL = true;
- zzEndRead = end;
- yybegin(initialState);
- }
-
- /**
- * Refills the input buffer.
- *
- * @return <code>false</code>, iff there was new input.
- *
- * @exception java.io.IOException if any I/O-Error occurs
- */
- private boolean zzRefill() throws java.io.IOException {
- return true;
- }
-
-
- /**
- * Returns the current lexical state.
- */
- public final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- public final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- public final CharSequence yytext() {
- return zzBuffer.subSequence(zzStartRead, zzMarkedPos);
- }
-
-
- /**
- * Returns the character at position <tt>pos</tt> from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- public final char yycharat(int pos) {
- return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos-zzStartRead;
- }
-
-
- /**
- * Reports an error that occured while scanning.
- *
- * In a wellformed scanner (no or only correct usage of
- * yypushback(int) and a match-all fallback rule) this method
- * will only be called with things that "Can't Possibly Happen".
- * If this method is called, something is seriously wrong
- * (e.g. a JFlex bug producing a faulty scanner etc.).
- *
- * Usual syntax/scanner level error handling should be done
- * in error fallback rules.
- *
- * @param errorCode the code of the errormessage to display
- */
- private void zzScanError(int errorCode) {
- String message;
- try {
- message = ZZ_ERROR_MSG[errorCode];
- }
- catch (ArrayIndexOutOfBoundsException e) {
- message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
- }
-
- throw new Error(message);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- public void yypushback(int number) {
- if ( number > yylength() )
- zzScanError(ZZ_PUSHBACK_2BIG);
-
- zzMarkedPos -= number;
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception java.io.IOException if any I/O-Error occurs
- */
- public IElementType advance() throws java.io.IOException {
- int zzInput;
- int zzAction;
-
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- CharSequence zzBufferL = zzBuffer;
- char[] zzBufferArrayL = zzBufferArray;
- char [] zzCMapL = ZZ_CMAP;
-
- int [] zzTransL = ZZ_TRANS;
- int [] zzRowMapL = ZZ_ROWMAP;
- int [] zzAttrL = ZZ_ATTRIBUTE;
-
- while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- zzState = ZZ_LEXSTATE[zzLexicalState];
-
-
- zzForAction: {
- while (true) {
-
- if (zzCurrentPosL < zzEndReadL)
- zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
- else if (zzAtEOF) {
- zzInput = YYEOF;
- break zzForAction;
- }
- else {
- // store back cached positions
- zzCurrentPos = zzCurrentPosL;
- zzMarkedPos = zzMarkedPosL;
- boolean eof = zzRefill();
- // get translated positions and possibly new buffer
- zzCurrentPosL = zzCurrentPos;
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- zzEndReadL = zzEndRead;
- if (eof) {
- zzInput = YYEOF;
- break zzForAction;
- }
- else {
- zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
- }
- }
- int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
- if (zzNext == -1) break zzForAction;
- zzState = zzNext;
-
- int zzAttributes = zzAttrL[zzState];
- if ( (zzAttributes & 1) == 1 ) {
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( (zzAttributes & 8) == 8 ) break zzForAction;
- }
-
- }
- }
-
- // store back cached position
- zzMarkedPos = zzMarkedPosL;
-
- switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
- case 3:
- { return NUMBER;
- }
- case 8: break;
- case 1:
- { return WORD;
- }
- case 9: break;
- case 6:
- { return EOP;
- }
- case 10: break;
- case 7:
- { return BOM;
- }
- case 11: break;
- case 2:
- { return EOL;
- }
- case 12: break;
- case 5:
- { return SPECIAL;
- }
- case 13: break;
- case 4:
- { return SPACE;
- }
- case 14: break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- return null;
- }
- else {
- zzScanError(ZZ_NO_MATCH);
- }
- }
- }
- }
-
-
-}
diff --git a/gen/org/jetbrains/markdown/lexer/idea-flex.skeleton b/gen/org/jetbrains/markdown/lexer/idea-flex.skeleton
deleted file mode 100644
index 234a62c4..00000000
--- a/gen/org/jetbrains/markdown/lexer/idea-flex.skeleton
+++ /dev/null
@@ -1,251 +0,0 @@
- /** initial size of the lookahead buffer */
---- private static final int ZZ_BUFFERSIZE = ...;
-
- /** lexical states */
---- lexical states, charmap
-
- /* error codes */
- private static final int ZZ_UNKNOWN_ERROR = 0;
- private static final int ZZ_NO_MATCH = 1;
- private static final int ZZ_PUSHBACK_2BIG = 2;
- private static final char[] EMPTY_BUFFER = new char[0];
- private static final int YYEOF = -1;
- private static java.io.Reader zzReader = null; // Fake
-
- /* error messages for the codes above */
- private static final String ZZ_ERROR_MSG[] = {
- "Unkown internal scanner error",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
---- isFinal list
- /** the current state of the DFA */
- private int zzState;
-
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private CharSequence zzBuffer = "";
-
- /** this buffer may contains the current text array to be matched when it is cheap to acquire it */
- private char[] zzBufferArray;
-
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int zzPushbackPos;
-
- /** the current text position in the buffer */
- private int zzCurrentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
-
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
-
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
-
---- user class code
-
---- constructor declaration
-
- public final int getTokenStart(){
- return zzStartRead;
- }
-
- public final int getTokenEnd(){
- return getTokenStart() + yylength();
- }
-
- public void reset(CharSequence buffer, int start, int end,int initialState){
- zzBuffer = buffer;
- zzBufferArray = com.intellij.util.text.CharArrayUtil.fromSequenceWithoutCopying(buffer);
- zzCurrentPos = zzMarkedPos = zzStartRead = start;
- zzPushbackPos = 0;
- zzAtEOF = false;
- zzAtBOL = true;
- zzEndRead = end;
- yybegin(initialState);
- }
-
- /**
- * Refills the input buffer.
- *
- * @return <code>false</code>, iff there was new input.
- *
- * @exception java.io.IOException if any I/O-Error occurs
- */
- private boolean zzRefill() throws java.io.IOException {
- return true;
- }
-
-
- /**
- * Returns the current lexical state.
- */
- public final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- public final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- public final CharSequence yytext() {
- return zzBuffer.subSequence(zzStartRead, zzMarkedPos);
- }
-
-
- /**
- * Returns the character at position <tt>pos</tt> from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- public final char yycharat(int pos) {
- return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos-zzStartRead;
- }
-
-
- /**
- * Reports an error that occured while scanning.
- *
- * In a wellformed scanner (no or only correct usage of
- * yypushback(int) and a match-all fallback rule) this method
- * will only be called with things that "Can't Possibly Happen".
- * If this method is called, something is seriously wrong
- * (e.g. a JFlex bug producing a faulty scanner etc.).
- *
- * Usual syntax/scanner level error handling should be done
- * in error fallback rules.
- *
- * @param errorCode the code of the errormessage to display
- */
---- zzScanError declaration
- String message;
- try {
- message = ZZ_ERROR_MSG[errorCode];
- }
- catch (ArrayIndexOutOfBoundsException e) {
- message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
- }
-
---- throws clause
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
---- yypushback decl (contains zzScanError exception)
- if ( number > yylength() )
- zzScanError(ZZ_PUSHBACK_2BIG);
-
- zzMarkedPos -= number;
- }
-
-
---- zzDoEOF
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception java.io.IOException if any I/O-Error occurs
- */
---- yylex declaration
- int zzInput;
- int zzAction;
-
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- CharSequence zzBufferL = zzBuffer;
- char[] zzBufferArrayL = zzBufferArray;
- char [] zzCMapL = ZZ_CMAP;
-
---- local declarations
-
- while (true) {
- zzMarkedPosL = zzMarkedPos;
-
---- start admin (line, char, col count)
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
---- start admin (lexstate etc)
-
- zzForAction: {
- while (true) {
-
---- next input, line, col, char count, next transition, isFinal action
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
---- line count update
- }
-
- }
- }
-
- // store back cached position
- zzMarkedPos = zzMarkedPosL;
---- char count update
-
---- actions
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
---- eofvalue
- }
- else {
---- no match
- }
- }
- }
- }
-
---- main
-
-}