问题描述:

Please excuse my terminology as I am still getting my head wrapped around everything. I am trying to put together my first parser and have trying to find as many examples as I can to in trying to build my grammar. I've seen many situations where a non-termianal gets multiplie productions

<F>::=(<E>)

<F>::=id

Which is the same as writing

<F>::id|(<E>)

From everything I've read, this is perfectly fine. What I am looking to do is the following

<atsign>::[email protected]

<expl>::=!

<special>::=!|@|#|$|%|^|&|*|(|)|+

Is there anything I need to be mindful of? Is my ordering correct for an LR parser? This isn't exactly homework as I am not in school at the moment, but it can be treated as such since I know this is a course I'll be taking in the future.

相关阅读:
Top