Commit 93dafcd7 authored by Custom2043's avatar Custom2043
Browse files

Exported MPL.mpl inside sources to update

parent 359b0e9e
......@@ -34,8 +34,8 @@ OptionalSearchToken = optionOpen {searches:SearchToken} optionClose
BracketSearchToken = exprOpen {searches:SearchToken} exprClose
OrSearchToken = 2-{searches:#SearchToken orToken|}
#SearchToken = ([searchNames:SearchName] searches:(TokenSearchToken|ArraySearchToken|OptionalSearchToken|BracketSearchToken)) | searches:OrSearchToken
#SearchToken = ([searchName:SearchName] searchToken:(TokenSearchToken|ArraySearchToken|OptionalSearchToken|BracketSearchToken)) | searchToken:OrSearchToken
Line = header:LineHeader {namedSearches:SearchToken}
Line = header:LineHeader {searchTokens:SearchToken}
anyChar = '*'
......@@ -10,9 +10,15 @@ public class Ignore extends Builder
{
/******** Java Meta Parser Generation ********/
public static final Ignore[] ignoredSearches =
public static final Ignore[] ignoredSearches =
{
new Ignore(23, new ArraySearch(new OrSearch(new TokenSearch(Space.builder), new TokenSearch(Jump.builder))))
new Ignore(22, new ArraySearch(
new OrSearch(
new TokenSearch(Space.builder),
new TokenSearch(Jump.builder)
)
)
),
};
/********** Do not modify or remove **********/
......
......@@ -17,34 +17,32 @@ public class ParserCharacter
new ParserCharacter(false, new char[]{'\"'}), //0
new ParserCharacter(false, new char[]{'\''}), //1
new ParserCharacter(false, new char[]{'\\'}), //2
new ParserCharacter(false, new char[]{'*'}), //3
new ParserCharacter(false, new char[]{'0'}), //4
new ParserCharacter(false, new char[]{'b'}), //5
new ParserCharacter(false, new char[]{'0'}, new char[]{'1'}), //6
new ParserCharacter(false, new char[]{'x'}), //7
new ParserCharacter(false, new char[]{'0', 'A'}, new char[]{'9', 'F'}), //8
new ParserCharacter(false, new char[]{'d'}), //9
new ParserCharacter(false, new char[]{'r'}), //10
new ParserCharacter(false, new char[]{'t'}), //11
new ParserCharacter(false, new char[]{'n'}), //12
new ParserCharacter(false, new char[]{'-'}), //13
new ParserCharacter(false, new char[]{'a', 'A'}, new char[]{'z', 'Z'}), //14
new ParserCharacter(false, new char[]{'0'}, new char[]{'9'}), //15
new ParserCharacter(false, new char[]{'('}), //16
new ParserCharacter(false, new char[]{')'}), //17
new ParserCharacter(false, new char[]{'['}), //18
new ParserCharacter(false, new char[]{']'}), //19
new ParserCharacter(false, new char[]{'{'}), //20
new ParserCharacter(false, new char[]{'}'}), //21
new ParserCharacter(false, new char[]{'!'}), //22
new ParserCharacter(false, new char[]{'|'}), //23
new ParserCharacter(false, new char[]{'#'}), //24
new ParserCharacter(false, new char[]{'='}), //25
new ParserCharacter(false, new char[]{'\r'}), //26
new ParserCharacter(false, new char[]{'\n'}), //27
new ParserCharacter(false, new char[]{' '}), //28
new ParserCharacter(false, new char[]{'\t'}), //29
new ParserCharacter(false, new char[]{':'}), //30
new ParserCharacter(false, new char[]{'0'}), //3
new ParserCharacter(false, new char[]{'b'}), //4
new ParserCharacter(false, new char[]{'0'}, new char[]{'1'}), //5
new ParserCharacter(false, new char[]{'x'}), //6
new ParserCharacter(false, new char[]{'0', 'A'}, new char[]{'9', 'F'}), //7
new ParserCharacter(false, new char[]{'d'}), //8
new ParserCharacter(false, new char[]{'r'}), //9
new ParserCharacter(false, new char[]{'t'}), //10
new ParserCharacter(false, new char[]{'n'}), //11
new ParserCharacter(false, new char[]{'-'}), //12
new ParserCharacter(false, new char[]{'a', 'A'}, new char[]{'z', 'Z'}), //13
new ParserCharacter(false, new char[]{'0'}, new char[]{'9'}), //14
new ParserCharacter(false, new char[]{'('}), //15
new ParserCharacter(false, new char[]{')'}), //16
new ParserCharacter(false, new char[]{'['}), //17
new ParserCharacter(false, new char[]{']'}), //18
new ParserCharacter(false, new char[]{'{'}), //19
new ParserCharacter(false, new char[]{'}'}), //20
new ParserCharacter(false, new char[]{'!'}), //21
new ParserCharacter(false, new char[]{'|'}), //22
new ParserCharacter(false, new char[]{'#'}), //23
new ParserCharacter(false, new char[]{'='}), //24
new ParserCharacter(false, new char[]{'\r'}), //25
new ParserCharacter(false, new char[]{'\n'}), //26
new ParserCharacter(false, new char[]{' '}), //27
new ParserCharacter(false, new char[]{':'}), //28
};
/********** Do not modify or remove **********/
......
......@@ -7,39 +7,38 @@ public class ParserString extends Token
public static final ParserStringBuilder quote = new ParserStringBuilder(false, 0, 0),
singleQuote = new ParserStringBuilder(false, 1, 1),
backslash = new ParserStringBuilder(false, 2, 2),
anyCharToken = new ParserStringBuilder(true, 3, 3),
trans0 = new ParserStringBuilder(true, 4, 4),
trans1 = new ParserStringBuilder(true, 4, 5),
trans2 = new ParserStringBuilder(true, 4, 6),
trans3 = new ParserStringBuilder(true, 4, 7),
trans4 = new ParserStringBuilder(true, 4, 8),
trans5 = new ParserStringBuilder(true, 4, 9),
trans6 = new ParserStringBuilder(true, 5, 5),
trans7 = new ParserStringBuilder(true, 5, 10),
trans8 = new ParserStringBuilder(true, 5, 11),
trans9 = new ParserStringBuilder(true, 5, 12),
trans10 = new ParserStringBuilder(true, 6, 13),
letter = new ParserStringBuilder(false, 8, 14),
digit = new ParserStringBuilder(false, 9, 15),
exprOpen = new ParserStringBuilder(false, 10, 16),
exprClose = new ParserStringBuilder(false, 11, 17),
optionOpen = new ParserStringBuilder(false, 12, 18),
optionClose = new ParserStringBuilder(false, 13, 19),
arrayOpen = new ParserStringBuilder(false, 14, 20),
arrayClose = new ParserStringBuilder(false, 15, 21),
notToken = new ParserStringBuilder(false, 16, 22),
orToken = new ParserStringBuilder(false, 17, 23),
transientToken = new ParserStringBuilder(false, 18, 24),
equals = new ParserStringBuilder(false, 19, 25),
trans11 = new ParserStringBuilder(true, 20, 26),
trans12 = new ParserStringBuilder(true, 20, 27),
trans13 = new ParserStringBuilder(true, 20, 28),
trans14 = new ParserStringBuilder(true, 21, 29),
trans15 = new ParserStringBuilder(true, 21, 30),
trans16 = new ParserStringBuilder(true, 24, 31),
trans17 = new ParserStringBuilder(true, 27, 13),
trans18 = new ParserStringBuilder(true, 27, 13),
anyChar = new ParserStringBuilder(false, 33, 32)
trans0 = new ParserStringBuilder(true, 3, 3),
trans1 = new ParserStringBuilder(true, 3, 4),
trans2 = new ParserStringBuilder(true, 3, 5),
trans3 = new ParserStringBuilder(true, 3, 6),
trans4 = new ParserStringBuilder(true, 3, 7),
trans5 = new ParserStringBuilder(true, 3, 8),
trans6 = new ParserStringBuilder(true, 4, 4),
trans7 = new ParserStringBuilder(true, 4, 9),
trans8 = new ParserStringBuilder(true, 4, 10),
trans9 = new ParserStringBuilder(true, 4, 11),
trans10 = new ParserStringBuilder(true, 5, 12),
letter = new ParserStringBuilder(false, 7, 13),
digit = new ParserStringBuilder(false, 8, 14),
exprOpen = new ParserStringBuilder(false, 9, 15),
exprClose = new ParserStringBuilder(false, 10, 16),
optionOpen = new ParserStringBuilder(false, 11, 17),
optionClose = new ParserStringBuilder(false, 12, 18),
arrayOpen = new ParserStringBuilder(false, 13, 19),
arrayClose = new ParserStringBuilder(false, 14, 20),
notToken = new ParserStringBuilder(false, 15, 21),
orToken = new ParserStringBuilder(false, 16, 22),
transientToken = new ParserStringBuilder(false, 17, 23),
equals = new ParserStringBuilder(false, 18, 24),
trans11 = new ParserStringBuilder(true, 19, 25),
trans12 = new ParserStringBuilder(true, 19, 26),
trans13 = new ParserStringBuilder(true, 19, 27),
trans14 = new ParserStringBuilder(true, 20, 28),
trans15 = new ParserStringBuilder(true, 20, 27),
trans16 = new ParserStringBuilder(true, 23, 29),
trans17 = new ParserStringBuilder(true, 26, 12),
trans18 = new ParserStringBuilder(true, 26, 12),
anyChar = new ParserStringBuilder(false, 32, 30)
;
private static final ParserCharacter[][] characters =
......@@ -69,14 +68,12 @@ public class ParserString extends Token
new ParserCharacter[]{ParserCharacter.chars[22]}, //22
new ParserCharacter[]{ParserCharacter.chars[23]}, //23
new ParserCharacter[]{ParserCharacter.chars[24]}, //24
new ParserCharacter[]{ParserCharacter.chars[25]}, //25
new ParserCharacter[]{ParserCharacter.chars[26],ParserCharacter.chars[27]}, //26
new ParserCharacter[]{ParserCharacter.chars[25],ParserCharacter.chars[26]}, //25
new ParserCharacter[]{ParserCharacter.chars[25]}, //26
new ParserCharacter[]{ParserCharacter.chars[26]}, //27
new ParserCharacter[]{ParserCharacter.chars[27]}, //28
new ParserCharacter[]{ParserCharacter.chars[28]}, //29
new ParserCharacter[]{ParserCharacter.chars[29]}, //30
new ParserCharacter[]{ParserCharacter.chars[30]}, //31
new ParserCharacter[]{ParserCharacter.any}, //32
new ParserCharacter[]{ParserCharacter.any}, //30
};
/********** Do not modify or remove **********/
......
......@@ -14,45 +14,35 @@ public abstract class Token
ParserString.quote,
ParserString.singleQuote,
ParserString.backslash,
ParserString.orToken,
CharacterToken.builder,
StringToken.builder,
ParserString.letter,
ParserString.digit,
ParserString.exprOpen,
ParserString.exprClose,
ParserString.arrayOpen,
ParserString.arrayClose,
ParserString.optionOpen,
ParserString.optionClose,
ParserString.arrayOpen,
ParserString.arrayClose,
ParserString.notToken,
ParserString.orToken,
ParserString.transientToken,
ParserString.equals,
Jump.builder,
Space.builder,
Identifier.builder,
SearchName.builder,
LineHeader.builder,
TokenSearchToken.builder,
ArraySearchToken.builder,
OptionalSearchToken.builder,
BracketSearchToken.builder,
OrSearchToken.builder,
Line.builder,
ParserString.anyChar,
};
public static final TokenBuilder[] transTokenBuilder =
{
NumberChar.builder,
SingleChar.builder,
SearchToken.builder
};
/********** Do not modify or remove **********/
......
......@@ -13,7 +13,7 @@ public class ArraySearchToken extends Token implements MultipleSearchToken
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 27, ArraySearchToken.class);
public static final TokenBuilder builder = new TokenBuilder(false, 26, ArraySearchToken.class);
public Result searchResults[];
public SearchToken searches[];
......
......@@ -12,7 +12,7 @@ public class BracketSearchToken extends Token implements MultipleSearchToken
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 29, BracketSearchToken.class);
public static final TokenBuilder builder = new TokenBuilder(false, 28, BracketSearchToken.class);
public Result searchResults[];
public SearchToken searches[];
......
......@@ -16,7 +16,7 @@ public class CharacterToken extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 6, CharacterToken.class);
public static final TokenBuilder builder = new TokenBuilder(false, 5, CharacterToken.class);
public Result searchResults[];
public Token character2[];
......
......@@ -15,7 +15,7 @@ public class Identifier extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 22, Identifier.class);
public static final TokenBuilder builder = new TokenBuilder(false, 21, Identifier.class);
public Result searchResults[];
public ParserString idName[];
......
......@@ -6,16 +6,14 @@ public class Jump extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 20, Jump.class);
public static final TokenBuilder builder = new TokenBuilder(false, 19, Jump.class);
public Result searchResults[];
public static final Search builderSearches[] = {
new OrSearch(
new TokenSearch(ParserString.trans11),
new OrSearch(
new TokenSearch(ParserString.trans12),
new TokenSearch(ParserString.trans13)
)
new TokenSearch(ParserString.trans12),
new TokenSearch(ParserString.trans13)
)
};
......
......@@ -11,11 +11,11 @@ public class Line extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 32, Line.class);
public static final TokenBuilder builder = new TokenBuilder(false, 31, Line.class);
public Result searchResults[];
public LineHeader header;
public SearchToken searchTokens[];
public LineHeader header;
public static final Search builderSearches[] = {
new TokenSearch("header", LineHeader.builder),
new ArraySearch(
......
......@@ -12,7 +12,7 @@ public class LineHeader extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 25, LineHeader.class);
public static final TokenBuilder builder = new TokenBuilder(false, 24, LineHeader.class);
public Result searchResults[];
public Identifier id;
......
......@@ -6,7 +6,7 @@ public class NumberChar extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(true, 4, NumberChar.class);
public static final TokenBuilder builder = new TokenBuilder(true, 3, NumberChar.class);
public Result searchResults[];
public ParserString value[];
......
......@@ -12,7 +12,7 @@ public class OptionalSearchToken extends Token implements MultipleSearchToken
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 28, OptionalSearchToken.class);
public static final TokenBuilder builder = new TokenBuilder(false, 27, OptionalSearchToken.class);
public Result searchResults[];
public SearchToken searches[];
......
......@@ -6,7 +6,7 @@ public class OrSearchToken extends Token implements MultipleSearchToken
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 30, OrSearchToken.class);
public static final TokenBuilder builder = new TokenBuilder(false, 29, OrSearchToken.class);
public Result searchResults[];
public SearchToken searches[];
......
......@@ -6,7 +6,7 @@ public class SearchName extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 24, SearchName.class);
public static final TokenBuilder builder = new TokenBuilder(false, 23, SearchName.class);
public Result searchResults[];
public Identifier id;
......
......@@ -6,11 +6,11 @@ public class SearchToken extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(true, 31, SearchToken.class);
public static final TokenBuilder builder = new TokenBuilder(true, 30, SearchToken.class);
public Result searchResults[];
public Token searchToken;
public SearchName searchName;
public Token searchToken;
public static final Search builderSearches[] = {
new OrSearch(
new BracketSearch(
......@@ -20,13 +20,9 @@ public class SearchToken extends Token
new BracketSearch("searchToken",
new OrSearch(
new TokenSearch(TokenSearchToken.builder),
new OrSearch(
new TokenSearch(ArraySearchToken.builder),
new OrSearch(
new TokenSearch(OptionalSearchToken.builder),
new TokenSearch(BracketSearchToken.builder)
)
)
new TokenSearch(ArraySearchToken.builder),
new TokenSearch(OptionalSearchToken.builder),
new TokenSearch(BracketSearchToken.builder)
)
)
),
......@@ -34,6 +30,7 @@ public class SearchToken extends Token
)
};
/********** Do not modify or remove **********/
public boolean canBeOptionnal()
{
......
......@@ -14,7 +14,7 @@ public class SingleChar extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(true, 5, SingleChar.class);
public static final TokenBuilder builder = new TokenBuilder(true, 4, SingleChar.class);
public Result searchResults[];
public ParserString backslash;
......@@ -25,32 +25,16 @@ public class SingleChar extends Token
new BracketSearch("backslash",
new OrSearch(
new TokenSearch(ParserString.trans6),
new OrSearch(
new TokenSearch(ParserString.trans7),
new OrSearch(
new TokenSearch(ParserString.trans8),
new OrSearch(
new TokenSearch(ParserString.trans9),
new OrSearch(
new TokenSearch(ParserString.backslash),
new OrSearch(
new TokenSearch(ParserString.anyCharToken),
new OrSearch(
new TokenSearch(ParserString.quote),
new TokenSearch(ParserString.singleQuote)
)
)
)
)
)
)
new TokenSearch(ParserString.trans7),
new TokenSearch(ParserString.trans8),
new TokenSearch(ParserString.trans9),
new TokenSearch(ParserString.backslash),
new TokenSearch(ParserString.quote),
new TokenSearch(ParserString.singleQuote)
)
)
),
new OrSearch(
new TokenSearch(ParserString.anyChar)
//new TokenSearch(ParserString.anyCharToken)
)
new TokenSearch(ParserString.anyChar)
)
};
......@@ -59,10 +43,7 @@ public class SingleChar extends Token
public String getString()
{
if (this.backslash != null)
if (this.backslash.index == ParserString.anyCharToken.getIndex())
return this.backslash.total;
else
return "\\"+this.backslash.total;
return "\\"+this.backslash.total;
return this.total;
}
......@@ -70,9 +51,7 @@ public class SingleChar extends Token
{
if (this.backslash != null)
{
if (this.backslash.index == ParserString.anyCharToken.getIndex())
return this.backslash.total.charAt(0);
else if (this.backslash.index == 7)
if (this.backslash.index == 7)
return '\b';
else if (this.backslash.index == 8)
return '\r';
......
......@@ -6,7 +6,7 @@ public class Space extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 21, Space.class);
public static final TokenBuilder builder = new TokenBuilder(false, 20, Space.class);
public Result searchResults[];
public static final Search builderSearches[] = {
......
......@@ -14,7 +14,7 @@ public class StringToken extends Token
{
/******** Java Meta Parser Generation ********/
public static final TokenBuilder builder = new TokenBuilder(false, 7, StringToken.class);
public static final TokenBuilder builder = new TokenBuilder(false, 6, StringToken.class);
public Result searchResults[];
public Token charTokens[];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment