alextricity25 / parse_apache_configs

A simple python library that will parse apache configs and convert them to a python dictionary.
Other
8 stars 4 forks source link

Improvements for 1.0 #12

Open daladim opened 4 years ago

daladim commented 4 years ago

Hi,

Thanks for your work on this Python module. This pull request proposes a few changes :

Thanks

lpogo commented 3 years ago

Hi, code is working really nice. Parsing is much easier right now. One point I see (not related exactly to this PR, but still), when "&" exist inside comment string, parsing failed, eg: # Listen & NameVirtualHost resources in module error: File "...\venv37\lib\site-packages\pyparsing.py", line 4182, in parseImpl raise maxException pyparsing.ParseException: Expected {Group:({"</" W:(ABCD...) ">" LineEnd}) ^ Group:({"<" {{W:(ABCD...) <SP><TAB><CR><LF> W:(ABCD...) <SP><TAB><CR><LF> <= | >= | == | != | < | > | ~ <SP><TAB><CR><LF> W:(ABCD...)} | {W:(ABCD...)}...} ">" LineEnd}) ^ Group:({W:(ABCD...) Suppress:(<SP><TAB><CR><LF>) W:(0123...) LineEnd}) ^ Group:({{"#" {W:(ABCD...)}... LineEnd} ^ {"#" LineEnd}}) ^ Group:(LineEnd)}, found '&' (at char 9), (line:1, col:10) Any ideas how to deal with it?