<lexer>
  <config>
    <name>SquidConf</name>
    <alias>squidconf</alias>
    <alias>squid.conf</alias>
    <alias>squid</alias>
    <filename>squid.conf</filename>
    <mime_type>text/x-squidconf</mime_type>
    <case_insensitive>true</case_insensitive>
    <not_multiline>true</not_multiline>
  </config>
  <rules>
    <state name="root">
      <rule pattern="\s+">
        <token type="TextWhitespace"/>
      </rule>
      <rule pattern="#">
        <token type="Comment"/>
        <push state="comment"/>
      </rule>
      <rule pattern="\b(redirect_rewrites_host_header|httpd_accel_uses_host_header|high_response_time_warning|delay_initial_bucket_level|memory_replacement_policy|maximum_single_addr_tries|cahce_replacement_policy|store_objects_per_bucket|mcast_icp_query_timeout|high_page_fault_warning|cache_stoplist_pattern|httpd_accel_with_proxy|request_body_max_size|authenticate_children|minimum_retry_timeout|incoming_http_average|store_avg_object_size|snmp_incoming_address|cache_effective_group|mcast_miss_encode_key|neighbor_type_domain|cache_effective_user|single_parent_bypass|tcp_incoming_address|udp_outgoing_address|tcp_outgoing_address|incoming_icp_average|udp_incoming_address|authenticate_program|minimum_object_size|ident_lookup_access|minimum_direct_hops|maximum_object_size|half_closed_clients|range_offset_limit|forward_snmpd_port|memory_pools_limit|siteselect_timeout|hierarchy_stoplist|netdb_ping_period|strip_query_terms|test_reachability|shutdown_lifetime|redirect_children|min_http_poll_cnt|cache_dns_program|anonymize_headers|dead_peer_timeout|cache_host_domain|emulate_httpd_log|http_reply_access|passthrough_proxy|icp_query_timeout|cache_peer_access|tcp_recv_bufsize|neighbor_timeout|negative_dns_ttl|min_icp_poll_cnt|swap_level1_dirs|visible_hostname|positive_dns_ttl|swap_level2_dirs|auth_param_basic|delay_parameters|proxy_auth_realm|redirect_program|udp_hit_obj_size|cache_access_log|httpd_accel_port|httpd_accel_host|authenticate_ttl|netdb_ping_rate|wais_relay_host|wais_relay_port|dns_nameservers|cache_swap_high|cache_store_log|request_timeout|refresh_pattern|http_anonymizer|announce_period|client_lifetime|as_whois_server|mcast_miss_port|mcast_miss_addr|reload_into_ims|cachemgr_passwd|log_icp_queries|connect_timeout|quick_abort_max|quick_abort_min|quick_abort_pct|unique_hostname|inside_firewall|unlinkd_program|fake_user_agent|ftpget_program|uri_whitespace|cache_announce|ftpget_options|cache_mem_high|cache_swap_low|logfile_rotate|cache_swap_log|fqdncache_size|pinger_program|client_netmask|header_replace|ftp_list_width|cache_host_acl|cache_stoplist|announce_port|prefer_direct|useragent_log|buffered_logs|append_domain|log_mime_hdrs|err_html_text|dns_testnames|forwarded_for|reference_age|announce_host|pconn_timeout|icp_hit_stale|always_direct|cache_mem_low|debug_options|header_access|ident_timeout|ipcache_size|request_size|never_direct|dns_children|negative_ttl|coredump_dir|pid_filename|delay_access|memory_pools|mcast_groups|dns_defnames|ident_lookup|ipcache_high|read_timeout|broken_posts|local_domain|ftp_passive|ipcache_low|quick_abort|delay_pools|announce_to|source_ping|delay_class|firewall_ip|miss_access|http_access|udp_hit_obj|snmp_access|httpd_accel|mime_table|proxy_auth|cache_peer|netdb_high|icp_access|hosts_file|cache_host|cache_swap|wais_relay|query_icmp|access_log|cache_dir|snmp_port|deny_info|client_db|cache_mem|http_port|htcp_port|cache_mgr|cache_log|ssl_proxy|netdb_low|ftp_user|local_ip|log_fqdn|no_cache|icp_port|acl)\b">
        <token type="Keyword"/>
      </rule>
      <rule pattern="\b(multicast-responder|offline_toggle|credentialsttl|round-robin|proxy-only|no-digest|no-query|children|disable|default|weight|parent|diskd|allow|realm|deny|heap|none|via|all|ttl|off|lru|on|q2|q1)\b">
        <token type="NameConstant"/>
      </rule>
      <rule pattern="\b(server_list|client_list|squid\.conf|parameter|shutdown|info)\b">
        <token type="LiteralString"/>
      </rule>
      <rule pattern="stats/(filedescriptors|reply_headers|utilization|redirector|vm_objects|fqdncache|objects|ipcache|netdb|dns|io)\b">
        <token type="LiteralString"/>
      </rule>
      <rule pattern="log/(disable|status|enable|clear)=">
        <token type="LiteralString"/>
      </rule>
      <rule pattern="\b(snmp_community|rep_mime_type|urlpath_regex|referer_regex|req_mime_type|dstdomain|url_regex|browser|method|proto|ident|time|port|user|src|dst)\b">
        <token type="Keyword"/>
      </rule>
      <rule pattern="(?:(?:(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})(?:\.(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})){3})|(?!.*::.*::)(?:(?!:)|:(?=:))(?:[0-9a-f]{0,4}(?:(?&lt;=::)|(?&lt;!::):)){6}(?:[0-9a-f]{0,4}(?:(?&lt;=::)|(?&lt;!::):)[0-9a-f]{0,4}(?:(?&lt;=::)|(?&lt;!:)|(?&lt;=:)(?&lt;!::):)|(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))(?:/(?:(?:(?:(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})(?:\.(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})){3})|(?!.*::.*::)(?:(?!:)|:(?=:))(?:[0-9a-f]{0,4}(?:(?&lt;=::)|(?&lt;!::):)){6}(?:[0-9a-f]{0,4}(?:(?&lt;=::)|(?&lt;!::):)[0-9a-f]{0,4}(?:(?&lt;=::)|(?&lt;!:)|(?&lt;=:)(?&lt;!::):)|(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|\b\d+\b))?">
        <token type="LiteralNumberFloat"/>
      </rule>
      <rule pattern="(?:\b\d+\b(?:-\b\d+|%)?)">
        <token type="LiteralNumber"/>
      </rule>
      <rule pattern="\S+">
        <token type="Text"/>
      </rule>
    </state>
    <state name="comment">
      <rule pattern="\s*TAG:.*">
        <token type="LiteralStringEscape"/>
        <pop depth="1"/>
      </rule>
      <rule pattern=".+">
        <token type="Comment"/>
        <pop depth="1"/>
      </rule>
      <rule>
        <pop depth="1"/>
      </rule>
    </state>
  </rules>
</lexer>