Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 1013 Bytes

Info.md

File metadata and controls

62 lines (45 loc) · 1013 Bytes

Our Query

SELECT c1,
       c2,
       _c3
FROM   t1
WHERE  c1 = 5.23
       AND c2 >= 2.6
        OR _c3 < 2

Components

Category Definition
digit [0-9]
letter [a-zA-Z]
int <digit>+
float <digit>+.<digit>+
identifier (<underline>)*<letter>(<underline><letter><digit>)*
keyword SELECT | FROM | WHERE | AND | OR
operator = | < | > | >=
comma ,
underline _
Map:
[] : range
+  : at least one
*  : zero or more
|  : or
() : group
<> : category

EBNF (Extended Backus–Naur Form):

query
    : 


Rules

Grammar notation Code representation
Terminal Code to match and consume a token
Non-Terminal Call to the related rule's function
` `
* or + while or for loop
? if statement

Our Classes & Methods