In order to simplify data entry with as little markup of the data as possible, I am attempting the following:
\documentclass{article}
\usepackage{etoolbox}
\begingroup
\obeylines
\gdef\ing#1 #2 #3{\gappto{\tabbody}{% Collect rows of tabular[x] in \tabbody
%% Ignore #1 and/or #2 if empty (= . )
\if.#2
\if.#1
&\\
\else
#1&\\
\fi
\else
\if.#1
\\
\else
#1\\
\fi
\fi
}%
}
\endgroup
%%%%%% This, without the \if's works, though it does not do what I need:
\begingroup
\obeylines
\gdef\iing#1 #2 #3{\gappto{\tabbody}{% Collect rows of tabular[x] in \tabbody
#1\\
}%
}
\endgroup
\begin{document}
\begingroup
\obeylines
\everypar={\ing} %<<<--- change to \iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
\endgroup
\begin{tabular}{ccc}
\tabbody
\end{tabular}
\end{document}
I'm getting an unexpected error:
ERROR: Incomplete \if; all text was ignored after line 39.
--- TeX said ---
<inserted text>
\fi
l.39 ^^I^^I\tabbody
I have looked at past queries, but have not thus far found an answer. If I remove all of the \if statements from the definition of \ing (=\iing) the problem goes a way. Quite sure I'm missing something really basic -- something to do with the timing of the expansion of the \ifs, but I'm stuck for the moment.

\obeylinesso many places? Dropping\obeylinesbefore the definition of\ingallows the file to compile and produces reasonable output. – Andrew Swann Apr 25 '19 at 14:38