Skip to content
Permalink
Browse files

fixes #715

  • Loading branch information...
Skillmon authored and hmenke committed Jul 23, 2019
1 parent ff369f8 commit 5c746e52df1bfcb5d88536d2f1b3a104ffffb9cf
@@ -213,8 +213,11 @@ \section{Parser Module}%
This macro stores the letter to which |\pgfparsertoken| was let. So if
you'd use |\pgfparserparse{foo}a| this macro would be defined with
|\def\pgfparserletter{a}|. This definition is done before any action code is
executed. There are two special cases: If |{| or |}| would be the next letter
for the parser, this macro is defined to expand to |\bgroup| or |\egroup|.
executed. There are four special cases: If the next token is of category code
1, 2, 6, or 10, so with standard category codes the tokens |{|, |}|, |#|, and
\textvisiblespace\ (a space) would be treated differently. In those cases this
macro expands to |\bgroup|, |\egroup|, |##|, and \textvisiblespace\ for the
categories 1, 2, 6, and 10, respectively.
\end{command}%

\begin{command}{\pgfparserset\marg{key list}}%
@@ -410,7 +410,7 @@
\def\pgfparserlet@g
{%
\ifx\pgfparserlet@argb\pgfutil@sptoken
% will also gobble the \pgfparserlet@c after \fi
% will also gobble the \pgfparserlet@h after \fi
\pgfparserlet@gobble@space\pgfparserlet@f
\fi
\pgfparserlet@h
@@ -496,24 +496,40 @@
{}
{\csname \pgfparser@current\space final action\endcsname}%
}
{%
\futurelet\pgfparsertoken\pgfparser@getnexttoken@a
}%
{\futurelet\pgfparsertoken\pgfparser@getnexttoken@a}%
}
\pgfutil@protected\def\pgfparser@getnexttoken@a
{%
\pgfparser@getnexttoken@iftokengobble\bgroup\bgroup
% check the problematic categories based on the meaning of the token
\edef\pgfparser@tokencategory{\pgfparser@extractmeaning\pgfparsertoken}%
\pgfparser@getnexttoken@ifcategory\pgfparser@category@i\bgroup
{%
\pgfparser@getnexttoken@iftokengobble\egroup\egroup
\pgfparser@getnexttoken@ifcategory\pgfparser@category@ii\egroup
{%
\pgfparser@getnexttoken@iftokengobble\pgfutil@sptoken{ }%
{\pgfparser@getnexttoken@defchar}%
\pgfparser@getnexttoken@ifcategory\pgfparser@category@x{ }%
{%
\pgfparser@getnexttoken@ifcategory\pgfparser@category@vi{####}%
{\pgfparser@getnexttoken@defchar}%
}%
}%
}%
}
\pgfutil@protected\def\pgfparser@getnexttoken@iftokengobble#1#2%
\begingroup
\def\pgfparser@extractmeaning#1%
{%
\ifx\pgfparsertoken#1%
\endgroup
\def\pgfparser@extractmeaning##1%
{\expandafter\pgfparser@extractmeaning@\meaning##1#1#1\pgfparser@mark}%
\def\pgfparser@extractmeaning@##1#1##2#1##3\pgfparser@mark{##1#1##2}%
}
\catcode`\ =12\pgfparser@extractmeaning{ } % ends the group
\edef\pgfparser@category@i{\pgfparser@extractmeaning\bgroup}
\edef\pgfparser@category@ii{\pgfparser@extractmeaning\egroup}
\edef\pgfparser@category@vi{\pgfparser@extractmeaning#}
\edef\pgfparser@category@x{\pgfparser@extractmeaning\pgfutil@sptoken}
\pgfutil@protected\def\pgfparser@getnexttoken@ifcategory#1#2%
{%
\ifx\pgfparser@tokencategory#1%
\def\pgfparserletter{#2}%
\pgfparser@getnexttoken@gobble
\fi

0 comments on commit 5c746e5

Please sign in to comment.
You can’t perform that action at this time.