This document outlines how to add new keywords to the lexer:
- Add them to the
priv/riak_ql_keywords.csvfile, one per line. Keeping this file in alphabetic order simplifies future changes. - Run
ruby priv/keyword_generator.rbwith Ruby 1.9.3 or newer. - Replace the keyword definitions near the top of
src/riak_ql_lexer.xrlwith the regex definitions (first chunk of output) from the message generator. - Replace the keyword rules in the
src/riak_ql_lexer.xrlfile with the second chunk of output from the message generator. - Save and commit the csv and lexer changes.
If this is done correctly, the commit diff should simply be a few lines added to the csv and a few lines added to the lexer.