# Regular definitions of numbers.

I'm currently working in the following excercise:

Build the regular definition of complex numbers taking into account the cartesian and polar form.

$$digit \rightarrow 0|1| \dots |9$$ $$digits \rightarrow digit \; digit^{*}$$ $$polar \rightarrow (\epsilon(+|-)digits)\theta$$ $$complex \rightarrow \epsilon \; digits \; i$$

I'm not sure about my approximation to the polar way and also the definition of the complex numbers, I'm still quite beginner in the area.

I would really appreciate any hint or help and thank you for taking the time to read my question.

• No floating point? – Hagen von Eitzen Jun 24 at 6:02

I'd try \begin{align} nonzerodigit\to& \textbf1|\textbf2|\textbf3|\textbf4|\textbf5|\textbf6|\textbf7|\textbf8|\textbf9\\ digit\to& \textbf0|nonzerodigit\\ decimals\to& digit\ digit^*\\ positivdecimals\to &digit^* nozerodigit\ digit^*\\ positiveinteger\to& nonzerodigit\, digit^*\\ positivereal\to& positiveinteger | \textbf{0.}positivedecimals | positiveinteger\textbf . decimals\\ nonzeroreal\to& (\textbf-|)positivereal\\ complex\to& \textbf0|nonzeroreal|nonzeroreal\ \textbf{i}\\&|nonzeroreal (\textbf+|\mathbf-)positivereal\ \textbf i \\ &|positivereal\ \textbf{exp(}positivereal\ \textbf{ i)} \end{align}