Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8973377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:25:55+00:00 2026-06-15T18:25:55+00:00

I just started using ParseKit to explore language creation and perhaps build a small

  • 0

I just started using ParseKit to explore language creation and perhaps build a small toy DSL. However, the current SVN trunk from Google is throwing a -[PKToken intValue]: unrecognized selector sent to instance ... when parsing this grammar:

@start = identifier ;
identifier = (Letter | '_') | (letterOrDigit | '_') ;
letterOrDigit = Letter | Digit ;

Against this input:

foo

Clearly, I am missing something or have incorrectly configured my project. What can I do to fix this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:25:56+00:00Added an answer on June 15, 2026 at 6:25 pm

    Developer of ParseKit here.

    First, see the ParseKit Tokenization docs.

    Basically, ParseKit can work in one of two modes: Let’s call them Tokens Mode and Chars Mode. (There are no formal names for these two modes, but perhaps there should be.)

    Tokens Mode is more popular by far. Virtually every example you will find of using ParseKit will show how to use Tokens Mode. I believe all of the documentation on http://parsekit.com is using Tokens Mode. ParseKit’s grammar feature (that you are using in your example only works in Tokens Mode).

    Chars Mode is a very little-known feature of ParseKit. I’ve never had anyone ask about it before.

    So the differences in the modes are:

    • In Tokens Mode, the ParseKit Tokenizer emits multi-char tokens (like Words, Symbols, Numbers, QuotedStrings etc) which are then parsed by the ParseKit parsers you create (programmatically or via grammars).
    • In Chars Mode, the ParseKit Tokenizer always emits single-char tokens which are then parsed by the ParseKit parsers you create programmatically. (grammars don’t currently work with this mode as this mode is not popular).

    You could use Chars Mode to implement Regular Expresions which parse on a char-by-char basis.


    For your example, you should be ignoring Chars Mode and just use Tokens Mode. The following Built-in Productions are for Chars Mode only. Do not use them in your grammars:

    (PK)Letter
    (PK)Digit
    (PK)Char
    (PK)SpecificChar 
    

    Notice how all of those Productions sound like they match individual chars. That’s because they do.

    Your example above should probably look like:

    @start = identifier;
    identifier = Word; // by default Words start with a-zA-Z_ and contain -0-9a-zAZ_'
    

    Keep in mind the Productions in your grammars (parsers like identifier) will be working on Tokens already emitted from ParseKit’s Tokenizer. Not individual chars.

    IOW: by the time your grammar goes to work parsing input, the input has already been tokenized into Tokens of type Word, Number, Symbol, QuotedString, etc.

    Here are all of the Built-in Productions available for use in your Grammar:

    Word
    Number 
    Symbol
    QuotedString
    Comment
    Any
    S // Whitespace. only available when @preservesWhitespaceTokens=YES. NO by default.
    

    Also:

    DelimitedString('start', 'end', 'allowedCharset')
    /xxx/i // RegEx match
    

    There are also operators for composite parsers:

      // Sequence
    | // Alternation
    ? // Optional
    + // Multiple
    * // Repetition
    ~ // Negation
    & // Intersection
    - // Difference
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started using Eclipse but already I have a small problem. At first
I just started using Scala and Spec2. However, I'm a little bit confusing of
I´ve just started using ASIHTTPRequest for iOs and I have a small issue with
I just started using SVN, and I have a cache directory that I don't
I just started using CCNet, and in the process of getting my build projects
I just started using Twitter Bootstrap http://twitter.github.com/bootstrap/scaffolding.html and I'm looking for the grey/blue navbar
I just started using rapidxml. I 1st create an xml file to read from.
I just started using/learning Python and have some questions. I have a text file
I just started using mysqli API for PHP. Apparently, every time an object of
I just started using virtualenv, and it was working normally until yesterday. Now, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.