chore: seperate into packages
This commit is contained in:
626
packages/query-dsl/docs/diagram/index.html
Normal file
626
packages/query-dsl/docs/diagram/index.html
Normal file
@@ -0,0 +1,626 @@
|
||||
|
||||
<!-- This is a generated file -->
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
body {
|
||||
background-color: hsl(30, 20%, 95%)
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<link rel='stylesheet' href='https://unpkg.com/chevrotain@11.0.3/diagrams/diagrams.css'>
|
||||
|
||||
<script src='https://unpkg.com/chevrotain@11.0.3/diagrams/vendor/railroad-diagrams.js'></script>
|
||||
<script src='https://unpkg.com/chevrotain@11.0.3/diagrams/src/diagrams_builder.js'></script>
|
||||
<script src='https://unpkg.com/chevrotain@11.0.3/diagrams/src/diagrams_behavior.js'></script>
|
||||
<script src='https://unpkg.com/chevrotain@11.0.3/diagrams/src/main.js'></script>
|
||||
|
||||
<div id="diagrams" align="center"></div>
|
||||
|
||||
<script>
|
||||
window.serializedGrammar = [
|
||||
{
|
||||
"type": "Rule",
|
||||
"name": "orExpression",
|
||||
"orgText": "",
|
||||
"definition": [
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "andExpression",
|
||||
"idx": 0
|
||||
},
|
||||
{
|
||||
"type": "Repetition",
|
||||
"idx": 0,
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Or",
|
||||
"label": "Or",
|
||||
"idx": 0,
|
||||
"pattern": "OR"
|
||||
},
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "andExpression",
|
||||
"idx": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Rule",
|
||||
"name": "andExpression",
|
||||
"orgText": "",
|
||||
"definition": [
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "primaryExpression",
|
||||
"idx": 0
|
||||
},
|
||||
{
|
||||
"type": "Repetition",
|
||||
"idx": 0,
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "And",
|
||||
"label": "And",
|
||||
"idx": 0,
|
||||
"pattern": "AND"
|
||||
},
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "primaryExpression",
|
||||
"idx": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Rule",
|
||||
"name": "primaryExpression",
|
||||
"orgText": "",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Alternation",
|
||||
"idx": 0,
|
||||
"definition": [
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "LParen",
|
||||
"label": "LParen",
|
||||
"idx": 0,
|
||||
"pattern": "\\("
|
||||
},
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "orExpression",
|
||||
"idx": 0
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "RParen",
|
||||
"label": "RParen",
|
||||
"idx": 0,
|
||||
"pattern": "\\)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "condition",
|
||||
"idx": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Rule",
|
||||
"name": "condition",
|
||||
"orgText": "",
|
||||
"definition": [
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "fieldReference",
|
||||
"idx": 0
|
||||
},
|
||||
{
|
||||
"type": "Alternation",
|
||||
"idx": 0,
|
||||
"definition": [
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Is",
|
||||
"label": "Is",
|
||||
"idx": 0,
|
||||
"pattern": "IS"
|
||||
},
|
||||
{
|
||||
"type": "Option",
|
||||
"idx": 0,
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Not",
|
||||
"label": "Not",
|
||||
"idx": 0,
|
||||
"pattern": "NOT"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Null",
|
||||
"label": "Null",
|
||||
"idx": 0,
|
||||
"pattern": "NULL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Not",
|
||||
"label": "Not",
|
||||
"idx": 2,
|
||||
"pattern": "NOT"
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "In",
|
||||
"label": "In",
|
||||
"idx": 0,
|
||||
"pattern": "IN"
|
||||
},
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "stringInList",
|
||||
"idx": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Not",
|
||||
"label": "Not",
|
||||
"idx": 3,
|
||||
"pattern": "NOT"
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "In",
|
||||
"label": "In",
|
||||
"idx": 2,
|
||||
"pattern": "IN"
|
||||
},
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "numberInList",
|
||||
"idx": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Not",
|
||||
"label": "Not",
|
||||
"idx": 4,
|
||||
"pattern": "NOT"
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Like",
|
||||
"label": "Like",
|
||||
"idx": 0,
|
||||
"pattern": "LIKE"
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "StringLiteral",
|
||||
"label": "StringLiteral",
|
||||
"idx": 0,
|
||||
"pattern": "'(?:''|[^'])*'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "In",
|
||||
"label": "In",
|
||||
"idx": 3,
|
||||
"pattern": "IN"
|
||||
},
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "stringInList",
|
||||
"idx": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "In",
|
||||
"label": "In",
|
||||
"idx": 4,
|
||||
"pattern": "IN"
|
||||
},
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "numberInList",
|
||||
"idx": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Like",
|
||||
"label": "Like",
|
||||
"idx": 2,
|
||||
"pattern": "LIKE"
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "StringLiteral",
|
||||
"label": "StringLiteral",
|
||||
"idx": 2,
|
||||
"pattern": "'(?:''|[^'])*'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Equals",
|
||||
"label": "Equals",
|
||||
"idx": 0,
|
||||
"pattern": "="
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "StringLiteral",
|
||||
"label": "StringLiteral",
|
||||
"idx": 3,
|
||||
"pattern": "'(?:''|[^'])*'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Equals",
|
||||
"label": "Equals",
|
||||
"idx": 2,
|
||||
"pattern": "="
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NumberLiteral",
|
||||
"label": "NumberLiteral",
|
||||
"idx": 0,
|
||||
"pattern": "-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Equals",
|
||||
"label": "Equals",
|
||||
"idx": 3,
|
||||
"pattern": "="
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Null",
|
||||
"label": "Null",
|
||||
"idx": 2,
|
||||
"pattern": "NULL"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NotEquals",
|
||||
"label": "NotEquals",
|
||||
"idx": 0,
|
||||
"pattern": "!="
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "StringLiteral",
|
||||
"label": "StringLiteral",
|
||||
"idx": 4,
|
||||
"pattern": "'(?:''|[^'])*'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NotEquals",
|
||||
"label": "NotEquals",
|
||||
"idx": 2,
|
||||
"pattern": "!="
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NumberLiteral",
|
||||
"label": "NumberLiteral",
|
||||
"idx": 2,
|
||||
"pattern": "-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "GreaterThan",
|
||||
"label": "GreaterThan",
|
||||
"idx": 0,
|
||||
"pattern": ">"
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NumberLiteral",
|
||||
"label": "NumberLiteral",
|
||||
"idx": 3,
|
||||
"pattern": "-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "GreaterThanOrEqual",
|
||||
"label": "GreaterThanOrEqual",
|
||||
"idx": 0,
|
||||
"pattern": ">="
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NumberLiteral",
|
||||
"label": "NumberLiteral",
|
||||
"idx": 4,
|
||||
"pattern": "-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "LessThan",
|
||||
"label": "LessThan",
|
||||
"idx": 0,
|
||||
"pattern": "<"
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NumberLiteral",
|
||||
"label": "NumberLiteral",
|
||||
"idx": 5,
|
||||
"pattern": "-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Alternative",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "LessThanOrEqual",
|
||||
"label": "LessThanOrEqual",
|
||||
"idx": 0,
|
||||
"pattern": "<="
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NumberLiteral",
|
||||
"label": "NumberLiteral",
|
||||
"idx": 6,
|
||||
"pattern": "-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Rule",
|
||||
"name": "fieldReference",
|
||||
"orgText": "",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Identifier",
|
||||
"label": "Identifier",
|
||||
"idx": 0,
|
||||
"pattern": "[a-zA-Z_][a-zA-Z0-9_]*"
|
||||
},
|
||||
{
|
||||
"type": "Repetition",
|
||||
"idx": 0,
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Dot",
|
||||
"label": "Dot",
|
||||
"idx": 0,
|
||||
"pattern": "\\."
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Identifier",
|
||||
"label": "Identifier",
|
||||
"idx": 2,
|
||||
"pattern": "[a-zA-Z_][a-zA-Z0-9_]*"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Rule",
|
||||
"name": "stringInList",
|
||||
"orgText": "",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "LParen",
|
||||
"label": "LParen",
|
||||
"idx": 0,
|
||||
"pattern": "\\("
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "StringLiteral",
|
||||
"label": "StringLiteral",
|
||||
"idx": 0,
|
||||
"pattern": "'(?:''|[^'])*'"
|
||||
},
|
||||
{
|
||||
"type": "Repetition",
|
||||
"idx": 0,
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Comma",
|
||||
"label": "Comma",
|
||||
"idx": 0,
|
||||
"pattern": ","
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "StringLiteral",
|
||||
"label": "StringLiteral",
|
||||
"idx": 2,
|
||||
"pattern": "'(?:''|[^'])*'"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "RParen",
|
||||
"label": "RParen",
|
||||
"idx": 0,
|
||||
"pattern": "\\)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Rule",
|
||||
"name": "numberInList",
|
||||
"orgText": "",
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "LParen",
|
||||
"label": "LParen",
|
||||
"idx": 2,
|
||||
"pattern": "\\("
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NumberLiteral",
|
||||
"label": "NumberLiteral",
|
||||
"idx": 0,
|
||||
"pattern": "-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?"
|
||||
},
|
||||
{
|
||||
"type": "Repetition",
|
||||
"idx": 0,
|
||||
"definition": [
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "Comma",
|
||||
"label": "Comma",
|
||||
"idx": 2,
|
||||
"pattern": ","
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "NumberLiteral",
|
||||
"label": "NumberLiteral",
|
||||
"idx": 2,
|
||||
"pattern": "-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Terminal",
|
||||
"name": "RParen",
|
||||
"label": "RParen",
|
||||
"idx": 2,
|
||||
"pattern": "\\)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Rule",
|
||||
"name": "query",
|
||||
"orgText": "",
|
||||
"definition": [
|
||||
{
|
||||
"type": "NonTerminal",
|
||||
"name": "orExpression",
|
||||
"idx": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var diagramsDiv = document.getElementById("diagrams");
|
||||
main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);
|
||||
</script>
|
||||
Reference in New Issue
Block a user