LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Hans Aberg <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Mon, 29 Jun 1998 12:16:23 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
Richard Walker wrote:
>Hans Aberg writes:
> >   The only point with a terminating ":" would be to make it easier
> > to know where the argspec ends if one processes the command
> > name.
...
>Hmm . . . at this stage let's say that an argspec can only contain
>A-Z and a-z.  Then the argspec is the longest contiguous sequence of
>letters after the colon - easily specified with a regular expression.

  Easier in TeX, that is (like in the example program below). If I am
allowed to write my own parser, it makes no difference, of course.

-------------------------------------------------------------------

\catcode`\:=11
\catcode`\@=11

\def\foo:A{foo and A}

\def\getargspec#1{\expandafter\@getargspec\string#1}

\catcode`\:=12
\def\@getargspec#1#2:#3{Command ``#2'' has argspec #3!}

\catcode`\:=11
\getargspec\foo:A

\end

-------------------------------------------------------------------

ATOM RSS1 RSS2