Parser that accepts Scala Identifiers?

Posted by Mirko Stocker on Stack Overflow See other posts from Stack Overflow or by Mirko Stocker
Published on 2010-06-14T06:40:23Z Indexed on 2010/06/14 6:42 UTC
Read the original article Hit count: 250

Filed under:
|

I was wondering whether the standard Scala parser combinators contain a parser that accepts the same identifiers that the Scala language itself also accepts (as specified in the Scala Language Specification, Section 1.1).

The StdTokenParsers trait has an ident parser, but it rejects identifiers like empty_?.

(If there is indeed no such parser, I could also just instantiate the Scala parser itself, but that wouldn't be as lightweight anymore.)

© Stack Overflow or respective owner

Related posts about parsing

Related posts about scala