Re: Open and close brackets read as single token



Thomas Revell wrote:

>> Otherwise, did you try turning the debug tracing on, and analyzing
>> the
>> output?
>
> Nope, but you're right, I should've done. I'll give that a try now.

And now have done. It looks as though the () string is being recognised as a
possible "string literal match". The section of the debug output that looks
relevant (to me, at least) is below (all debug options were on):

Consumed token: <<DEFFN>: "DEF FN">
Call: Function_Definition
Current character : ( (40)
Currently matched the first 1 characters as a "(" token.
Possible string literal matches : { "()" }
Current character : ) (41)
No more string literal token matches are possible.
Currently matched the first 2 characters as a "()" token.
****** FOUND A "()" MATCH (()) ******

Consumed token: <<NUMERIC_IDENTIFIER>: "q">
Current character : = (61)
No more string literal token matches are possible.
Currently matched the first 1 characters as a "=" token.
****** FOUND A "=" MATCH (=) ******

To me, it's looking more and more like I've somehow accidentally defined
"()" as a valid token in itself. I can't find where though (I've listed all
of the tokens in my reply to Ben Segall).

Tom.
.



Relevant Pages

  • Re: Iron Heroes: the good things
    ... I really like the idea of customizing human characters. ... >> Essentially, you earn tokens for doing certain things, mostly in combat ... >> Skill Groups, which essentially allow the character to spend 1 skill ... The greatest thing about it is the Fury tokens. ...
    (rec.games.frp.dnd)
  • Re: Problem defining egin{CJK} . . . end{CJK} in a macro
    ... The process of transforming stuff into tokens while reading input ... characters while reading them from input-file are treated like ... executed when defining takes place but when the defined macro ... - Start a CJK-environment ...
    (comp.text.tex)
  • Re: Splitting a string with Regex and keep the separator
    ... The regex is quite big already. ... a key/val pair. ... If this group captures multiple tokens they're added to the group's Captures collection in the order in which they're found. ... A token is made up of one or more alphanumeric characters. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Splitting a string with Regex and keep the separator
    ... I want also to thank you for the regex explanation. ... a key/val pair. ... If this group captures multiple tokens they're added to the ... is made up of one or more alphanumeric characters. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: parsing VB code with a regex
    ... Any characters to the right of the comment are ... So, now that we're down to a single string, and a few simple rules: ... All other tokens should be matched. ... regular expression, it is not available for further matching. ...
    (microsoft.public.dotnet.general)