Hi, is it possible to parse a subcomponent of a machine specification? I mean:


        alphanum = [a-zA-Z0-9]
        protocol = ('sip'i|'sips'i)
        user = alphanum+
        host = ( '.' | alphanum )+
        
        main := protocol ':' user '@' host ;


This code allow me to parse a complete SIP uri using "%% write exec;", but 
what about if I also want to parse a single "user" component? must I to 
duplicate the code creating a new machine just for "user"?:

        alphanum = [a-zA-Z0-9]
        main := alphanum+

Since "user" is already defined in the above machine, couldn't I use that 
machine to parse a string just containing a "user" text?

Thanks a lot.

-- 
Iñaki Baz Castillo

_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to