speechmarkdown / speechmarkdown-js

Speech Markdown grammar, parser, and formatters for use with JavaScript.
MIT License
76 stars 16 forks source link

Grammar - telephone not parsing parenthesis or dashes correctly #6

Closed rmtuckerphx closed 5 years ago

rmtuckerphx commented 5 years ago

Various tests in telephone-standard.spec.ts are commented out. Need to fix grammar to accept values with parenthesis or dashes. See SpeechMarkdownGrammar.ts

Fleker commented 5 years ago

Is it really necessary to have the nested parenthesis? ((888) 555-1298)[phone] seems a bit messy.

Fleker commented 5 years ago

I've updated the grammar to do this. It does result in some unfortunate behavior of Myna's grammar parser to be overly assertive when using core functions like Myna.parenthesized, which was causing exceptions to occur.

Fleker commented 5 years ago

This should be fixed now.