On 10.11.20 14:52, Juha Heinanen wrote: > Daniel-Constantin Mierla writes: > >> So for now, if someone doesn't want the #!KAMAILIO (or the other >> variants) in the first line, can add it temporarily only when it uses >> the --cfg-print, then remove it. Of course, if someone wants to look >> more into it, is more than welcome to make pull requests. > It is OK to have that in the first line, but my question was, can there > be something else on the first line after #!KAMAILIO? So is the test > > first_line == "#!KAMAILIO" > > or > > starts_with(first_line, "#!KAMAILIO") > > ?
Flex does token based parsing -- I haven't tried it, but it should work even if it is something before or after it. More constraints can be added, e.g., to be at the beginning of the line, or the only content in the line, but currently the cfg.lex doesn't have any. Cheers, Daniel -- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla _______________________________________________ Kamailio (SER) - Development Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
