-
-
Save takeoutweight/2338894 to your computer and use it in GitHub Desktop.
Revisions
-
takeoutweight revised this gist
Apr 8, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,8 @@ (<* number (string "=")))]))) (z/parse-once identifier2 "#234=") #zetta.core.ResultFailure{:remainder (\=), :stack [], :msg "Failed reading: take-with"} parse> (z/parse-once identifier2 "#234#") #zetta.core.ResultDone{:remainder (), :result 234} ;I think i probably should read some attoparsec tutorials -- I'm pretty ignorant of the basics so I'm not ;sure where to begin fixing (i.e. maybe I've just built things wrong or loaded something incorrectly...) -
takeoutweight revised this gist
Apr 8, 2012 . 1 changed file with 14 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,17 @@ ;Hrm... I actually tried a similar approach before but: (def identifier2 (around whitespaces (choice [(*> (string "#") (<* number (string "#"))) (*> (string "#") (<* number (string "=")))]))) (z/parse-once identifier2 "#234=") ; #zetta.core.ResultFailure{:remainder (\=), :stack [], :msg "Failed reading: take-with"} parse> (z/parse-once identifier2 "#234#") #zetta.core.ResultDone{:remainder (), :result 234} I think i probably should read some attoparsec tutorials -- I'm pretty ignorant of the basics so I'm not sure where to begin fixing (i.e. maybe I've just built things wrong or loaded something incorrectly...) -
roman revised this gist
Apr 8, 2012 . 2 changed files with 13 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ (def identifier (around whitespaces (choice [(<$> (partial apply vector) (*> (string "#") (<* number (string "#")))) ; ^ I think you should be using just number here right? ; you are trying to parse (many1 digit) (<$> (partial apply vector) (*> (string "#") (<* number (string "="))))]))) ; ^ same applies here This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +0,0 @@ -
takeoutweight created this gist
Apr 8, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ (def identifier (around whitespaces (choice [(<$> (partial apply vector) (*> (string "#") (<* (many1 number) (string "#")))) (<$> (partial apply vector) (*> (string "#") (<* (many1 number) (string "="))))])))