Simplify Slack /reminder command grammar
Simplified Slack Reminder Grammer to parse /remind commands like
npx slack-reminder-grammar "/remind @sibelius work tomorrow"
[
{
someoneChannel: { type: 'someone', value: 'sibelius' },
what: 'work',
when: 'tomorrow',
}
]
npx slack-reminder-grammar "/remind #general party next week"
[
{
someoneChannel: { type: 'channel', value: 'general' },
what: 'party',
when: 'next week',
}
]
We use Nearley to compile our grammar written in Nearley syntax (close to EBNF)
The grammar is described at GrammarReminderSlack
We compile the grammar using nearleyc
Parsing Absolutely Anything in Javascript using Earley Algorithm by @gajus is a great start
No, and Turing completeness are not useful in all domain languages.