dyne / slangroom

Enhance zencode smart contracts with your slang
https://dyne.org/slangroom/
GNU Affero General Public License v3.0
5 stars 1 forks source link

autogenerate grammar syntax #200

Open matteo-cristino opened 2 months ago

matteo-cristino commented 2 months ago

Autogenerate slangroom syntax by inserting directly all sentences in grammar/syntax.grammar paying attention to have all the possible choice since parameters do not have a specific position, e.g.

 Given I …(send obj1 '' and send obj2 '' and | send obj2 '' and send obj1 '' and)… {phrase}

Moreover a list of all words used in salngroom should be collected and added in the syntax.grammar and generate on the fly the grammar/src/token.js file with all the word.

All this should be done from the file grammar/utils/prepare_complete.mjs (maybe it can change also name since from now on it will be used also for the grammar