[Ometa] Case-insensitive seq?
Frank Shearar
frank.shearar at angband.za.org
Fri Dec 19 01:50:02 PST 2008
Hi everyone,
I've been writing an Ometa parser for the Delphi language.
Up to now, I've been using a copy of the OSqueakParser>>token production
(token :xs ::= <spaces> <seq xs>). Delphi is, however, a case insensitive
kind've language. Thus, when I write <token 'integer'> in a production, what
I really want is to accept "Integer" or "INTEGER" or any other permutation
of case.
I've tried a number of things but haven't found anything that works:
* hacked a seqNoCase starting from a duplicate of Ometa>>seq
* using something like <spaces> <char>+:s ?[(String withAll: s) asLowercase
= (String withAll: xs) asLowercase] => [String withAll: s]
I've run out of steam trying to figure out this problem, so I thought I'd
try here :) Any ideas on how to accept a sequence that matches some input
(of character), without regard to case?
Many thanks for any help you might offer,
frank
More information about the OMeta
mailing list