We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm creating a jison grammar
I want that everytime user types for example List the parser returns Match because this is some king of database query generator...for example:
List Contracts Where C.price Lesser 500 Return C.price, EntityE.name
And then the parser should return me:
MATCH (E1:ENTIDADE)-[C:CONTRATO]->(E2:ENTIDADE) WHERE C.price < 500 RETURN C.price, E1.name
So far, this is my jison file:
/* lexical grammar */ %lex %% \s+ /* skip whitespace */ List return 'MATCH' Contracts return '(E1:ENTIDADE)-[C:CONTRATO]->(E2:ENTIDADE)' Where return 'WHERE' EntityE return 'E1' EntityA return 'E2' Contract return 'C' . return '.' Equals return '=' Contains return 'CONTAINS' Between return 'BETWEEN' Greater return '>' Lesser return '<' AND return 'AND' OR return 'OR' Return return 'RETURN' ; return 'ENDRULE' <<EOF>> return 'EOF' /lex %start expressions %% expressions : rule {$$ = $1 console.log("rule: " + $$)} ; rule: List Contracts Where { $$ = $1 + " " + $2 + " " + $3 + " " } ;
Am i doing it the right way?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm creating a jison grammar
I want that everytime user types for example List the parser returns Match because this is some king of database query generator...for example:
And then the parser should return me:
So far, this is my jison file:
Am i doing it the right way?
The text was updated successfully, but these errors were encountered: