Created
November 9, 2010 00:48
-
-
Save derdewey/668540 to your computer and use it in GitHub Desktop.
Parse debian Packages.gz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar Debian | |
rule collection | |
entry+ | |
end | |
rule entry | |
(tag space value) | |
end | |
rule package_details | |
tag value &[^$] | |
end | |
rule tag | |
[A-Za-z0-9\-]+ ":" | |
end | |
rule value | |
(!tag value_line+ "\n")+ | |
end | |
rule value_line | |
([A-Za-z0-9 <>@()=\.\-|/,_"':])+ | |
end | |
rule space | |
[ \t]+ | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment