slack-reminder-grammar
v1.0.3
Published
Simplified Slack Reminder Grammer to parse /remind commands like
Downloads
2
Readme
Slack Reminder Grammar
Simplified Slack Reminder Grammer to parse /remind commands like
Examples
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',
}
]
How it works?
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
Other resources to learn about parsers and Nearley
Parsing Absolutely Anything in Javascript using Earley Algorithm by @gajus is a great start
Is this Turing complete?
No, and Turing completeness are not useful in all domain languages.