-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Support for latest syntax, per w3c/did-core#334
Signed-off-by: Markus Sabadello <[email protected]>
- Loading branch information
1 parent
501b49f
commit f9be99b
Showing
35 changed files
with
270 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
/* ----------------------------------------------------------------------------- | ||
* Rule_did_query.java | ||
* ----------------------------------------------------------------------------- | ||
* | ||
* Producer : com.parse2.aparse.Parser 2.5 | ||
* Produced : Mon Jul 13 23:12:39 CEST 2020 | ||
* | ||
* ----------------------------------------------------------------------------- | ||
*/ | ||
|
||
package did.parser; | ||
|
||
import java.util.ArrayList; | ||
|
||
final public class Rule_did_query extends Rule | ||
{ | ||
public Rule_did_query(String spelling, ArrayList<Rule> rules) | ||
{ | ||
super(spelling, rules); | ||
} | ||
|
||
public Object accept(Visitor visitor) | ||
{ | ||
return visitor.visit(this); | ||
} | ||
|
||
public static Rule_did_query parse(ParserContext context) | ||
{ | ||
context.push("did-query"); | ||
|
||
boolean parsed = true; | ||
int s0 = context.index; | ||
ParserAlternative a0 = new ParserAlternative(s0); | ||
|
||
ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); | ||
parsed = false; | ||
{ | ||
int s1 = context.index; | ||
ParserAlternative a1 = new ParserAlternative(s1); | ||
parsed = true; | ||
if (parsed) | ||
{ | ||
boolean f1 = true; | ||
int c1 = 0; | ||
for (int i1 = 0; i1 < 1 && f1; i1++) | ||
{ | ||
Rule rule = Rule_param.parse(context); | ||
if ((f1 = rule != null)) | ||
{ | ||
a1.add(rule, context.index); | ||
c1++; | ||
} | ||
} | ||
parsed = c1 == 1; | ||
} | ||
if (parsed) | ||
{ | ||
boolean f1 = true; | ||
@SuppressWarnings("unused") | ||
int c1 = 0; | ||
while (f1) | ||
{ | ||
int g1 = context.index; | ||
ArrayList<ParserAlternative> as2 = new ArrayList<ParserAlternative>(); | ||
parsed = false; | ||
{ | ||
int s2 = context.index; | ||
ParserAlternative a2 = new ParserAlternative(s2); | ||
parsed = true; | ||
if (parsed) | ||
{ | ||
boolean f2 = true; | ||
int c2 = 0; | ||
for (int i2 = 0; i2 < 1 && f2; i2++) | ||
{ | ||
Rule rule = Terminal_StringValue.parse(context, "&"); | ||
if ((f2 = rule != null)) | ||
{ | ||
a2.add(rule, context.index); | ||
c2++; | ||
} | ||
} | ||
parsed = c2 == 1; | ||
} | ||
if (parsed) | ||
{ | ||
boolean f2 = true; | ||
int c2 = 0; | ||
for (int i2 = 0; i2 < 1 && f2; i2++) | ||
{ | ||
Rule rule = Rule_param.parse(context); | ||
if ((f2 = rule != null)) | ||
{ | ||
a2.add(rule, context.index); | ||
c2++; | ||
} | ||
} | ||
parsed = c2 == 1; | ||
} | ||
if (parsed) | ||
{ | ||
as2.add(a2); | ||
} | ||
context.index = s2; | ||
} | ||
|
||
ParserAlternative b = ParserAlternative.getBest(as2); | ||
|
||
parsed = b != null; | ||
|
||
if (parsed) | ||
{ | ||
a1.add(b.rules, b.end); | ||
context.index = b.end; | ||
} | ||
|
||
f1 = context.index > g1; | ||
if (parsed) c1++; | ||
} | ||
parsed = true; | ||
} | ||
if (parsed) | ||
{ | ||
as1.add(a1); | ||
} | ||
context.index = s1; | ||
} | ||
|
||
ParserAlternative b = ParserAlternative.getBest(as1); | ||
|
||
parsed = b != null; | ||
|
||
if (parsed) | ||
{ | ||
a0.add(b.rules, b.end); | ||
context.index = b.end; | ||
} | ||
|
||
Rule rule = null; | ||
if (parsed) | ||
{ | ||
rule = new Rule_did_query(context.text.substring(a0.start, a0.end), a0.rules); | ||
} | ||
else | ||
{ | ||
context.index = s0; | ||
} | ||
|
||
context.pop("did-query", parsed); | ||
|
||
return (Rule_did_query)rule; | ||
} | ||
} | ||
|
||
/* ----------------------------------------------------------------------------- | ||
* eof | ||
* ----------------------------------------------------------------------------- | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.