Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from panesofglass/master.

merging panesofglass' work to update to latest parser/.NET FX, rename methods to more suitable names and add a FAKE build script
  • Loading branch information...
commit 1762417cef0be165ad98058ef713ea9a9398a341 2 parents 9d5196a + c95beda
@devhawk authored
Showing with 27,193 additions and 1,380 deletions.
  1. +34 −5 .gitignore
  2. +14 −0 Cashel.nuspec
  3. +12 −5 {Cashel → }/Cashel.sln
  4. +0 −338 Cashel/Cashel.Peg/peg.fs
  5. +0 −442 Cashel/Cashel.Peg/peg2.fs
  6. +0 −186 Cashel/Cashel.Tests/primitives_test.fs
  7. +0 −44 Cashel/Cashel/parser.fs
  8. +0 −113 Cashel/Cashel/primitives.fs
  9. +0 −1  Cashel/runtests.ps1
  10. +0 −2  External/.gitignore
  11. BIN  External/FsxUnit.dll
  12. BIN  External/xunit.console.exe
  13. BIN  External/xunit.dll
  14. BIN  External/xunit.runner.utility.dll
  15. +15 −0 LICENSE.txt
  16. +4 −0 build.bat
  17. +130 −0 build.fsx
  18. +10 −0 lib/FAKE/DocuLicense.txt
  19. BIN  lib/FAKE/FAKE.exe
  20. +8 −0 lib/FAKE/FAKE.exe.config
  21. BIN  lib/FAKE/FSharp.Core.dll
  22. BIN  lib/FAKE/FSharp.Core.optdata
  23. BIN  lib/FAKE/FSharp.Core.sigdata
  24. +9,219 −0 lib/FAKE/FSharp.Core.xml
  25. +187 −0 lib/FAKE/Fake.Gallio.XML
  26. BIN  lib/FAKE/Fake.Gallio.dll
  27. +138 −0 lib/FAKE/Fake.SQL.XML
  28. BIN  lib/FAKE/Fake.SQL.dll
  29. +3,261 −0 lib/FAKE/FakeLib.XML
  30. BIN  lib/FAKE/FakeLib.dll
  31. BIN  lib/FAKE/Gallio.dll
  32. BIN  lib/FAKE/ICSharpCode.SharpZipLib.dll
  33. +54 −0 lib/FAKE/License.txt
  34. BIN  lib/FAKE/docu.exe
  35. +335 −0 lib/FAKE/readme.markdown
  36. BIN  lib/FSharp/FSharp.Build.dll
  37. BIN  lib/FSharp/FSharp.Compiler.Interactive.Settings.dll
  38. BIN  lib/FSharp/FSharp.Compiler.Server.Shared.dll
  39. BIN  lib/FSharp/FSharp.Compiler.dll
  40. BIN  lib/FSharp/FSharp.Core.dll
  41. BIN  lib/FSharp/FSharp.Core.optdata
  42. BIN  lib/FSharp/FSharp.Core.sigdata
  43. BIN  lib/FSharp/FSharp.PowerPack.dll
  44. BIN  lib/FSharp/Fsc.exe
  45. BIN  lib/FSharp/Fsi.exe
  46. +6 −0 lib/FSharp/Fsi.exe.config
  47. +231 −0 lib/FSharp/Microsoft.FSharp.targets
  48. +35 −0 packages/FsUnit.0.9.0/Content/FsUnitSample.fs.pp
  49. BIN  packages/FsUnit.0.9.0/FsUnit.0.9.0.nupkg
  50. BIN  packages/FsUnit.0.9.0/Lib/FsUnit.NUnit-0.9.0.dll
  51. BIN  packages/NUnit.2.5.9.10348/Logo.ico
  52. BIN  packages/NUnit.2.5.9.10348/NUnit.2.5.9.10348.nupkg
  53. +277 −0 packages/NUnit.2.5.9.10348/NUnitFitTests.html
  54. +277 −0 packages/NUnit.2.5.9.10348/Tools/NUnitFitTests.html
  55. +85 −0 packages/NUnit.2.5.9.10348/Tools/NUnitTests.config
  56. +14 −0 packages/NUnit.2.5.9.10348/Tools/NUnitTests.nunit
  57. +4 −0 packages/NUnit.2.5.9.10348/Tools/agent.conf
  58. +18 −0 packages/NUnit.2.5.9.10348/Tools/agent.log.conf
  59. +18 −0 packages/NUnit.2.5.9.10348/Tools/launcher.log.conf
  60. BIN  packages/NUnit.2.5.9.10348/Tools/lib/Failure.png
  61. BIN  packages/NUnit.2.5.9.10348/Tools/lib/Ignored.png
  62. BIN  packages/NUnit.2.5.9.10348/Tools/lib/Inconclusive.png
  63. BIN  packages/NUnit.2.5.9.10348/Tools/lib/Skipped.png
  64. BIN  packages/NUnit.2.5.9.10348/Tools/lib/Success.png
  65. BIN  packages/NUnit.2.5.9.10348/Tools/lib/fit.dll
  66. BIN  packages/NUnit.2.5.9.10348/Tools/lib/log4net.dll
  67. BIN  packages/NUnit.2.5.9.10348/Tools/lib/nunit-console-runner.dll
  68. BIN  packages/NUnit.2.5.9.10348/Tools/lib/nunit-gui-runner.dll
  69. BIN  packages/NUnit.2.5.9.10348/Tools/lib/nunit.core.dll
  70. BIN  packages/NUnit.2.5.9.10348/Tools/lib/nunit.core.interfaces.dll
  71. BIN  packages/NUnit.2.5.9.10348/Tools/lib/nunit.fixtures.dll
  72. BIN  packages/NUnit.2.5.9.10348/Tools/lib/nunit.uiexception.dll
  73. BIN  packages/NUnit.2.5.9.10348/Tools/lib/nunit.uikit.dll
  74. BIN  packages/NUnit.2.5.9.10348/Tools/lib/nunit.util.dll
  75. BIN  packages/NUnit.2.5.9.10348/Tools/nunit-agent-x86.exe
  76. +69 −0 packages/NUnit.2.5.9.10348/Tools/nunit-agent-x86.exe.config
  77. BIN  packages/NUnit.2.5.9.10348/Tools/nunit-agent.exe
  78. +69 −0 packages/NUnit.2.5.9.10348/Tools/nunit-agent.exe.config
  79. BIN  packages/NUnit.2.5.9.10348/Tools/nunit-console-x86.exe
  80. +69 −0 packages/NUnit.2.5.9.10348/Tools/nunit-console-x86.exe.config
  81. BIN  packages/NUnit.2.5.9.10348/Tools/nunit-console.exe
  82. +69 −0 packages/NUnit.2.5.9.10348/Tools/nunit-console.exe.config
  83. BIN  packages/NUnit.2.5.9.10348/Tools/nunit-x86.exe
  84. +83 −0 packages/NUnit.2.5.9.10348/Tools/nunit-x86.exe.config
  85. BIN  packages/NUnit.2.5.9.10348/Tools/nunit.exe
  86. +83 −0 packages/NUnit.2.5.9.10348/Tools/nunit.exe.config
  87. BIN  packages/NUnit.2.5.9.10348/Tools/nunit.framework.dll
  88. BIN  packages/NUnit.2.5.9.10348/Tools/pnunit-agent.exe
  89. +77 −0 packages/NUnit.2.5.9.10348/Tools/pnunit-agent.exe.config
  90. BIN  packages/NUnit.2.5.9.10348/Tools/pnunit-launcher.exe
  91. +77 −0 packages/NUnit.2.5.9.10348/Tools/pnunit-launcher.exe.config
  92. BIN  packages/NUnit.2.5.9.10348/Tools/pnunit.framework.dll
  93. BIN  packages/NUnit.2.5.9.10348/Tools/pnunit.tests.dll
  94. BIN  packages/NUnit.2.5.9.10348/Tools/runFile.exe
  95. +43 −0 packages/NUnit.2.5.9.10348/Tools/runFile.exe.config
  96. +2 −0  packages/NUnit.2.5.9.10348/Tools/runpnunit.bat
  97. +24 −0 packages/NUnit.2.5.9.10348/Tools/test.conf
  98. +342 −0 packages/NUnit.2.5.9.10348/fit-license.txt
  99. BIN  packages/NUnit.2.5.9.10348/lib/nunit.framework.dll
  100. +10,385 −0 packages/NUnit.2.5.9.10348/lib/nunit.framework.xml
  101. BIN  packages/NUnit.2.5.9.10348/lib/nunit.mocks.dll
  102. BIN  packages/NUnit.2.5.9.10348/lib/pnunit.framework.dll
  103. +15 −0 packages/NUnit.2.5.9.10348/license.txt
  104. +4 −0 packages/repositories.config
  105. +9 −10 {Cashel → src}/Cashel.Peg/Cashel.Peg.fsproj
  106. +335 −0 src/Cashel.Peg/peg.fs
  107. +443 −0 src/Cashel.Peg/peg2.fs
  108. +28 −30 {Cashel → src}/Cashel.Tests/Cashel.Tests.fsproj
  109. +203 −0 src/Cashel.Tests/ListPrimitivesTest.fs
  110. +13 −14 Cashel/Cashel.Tests/parser_test.fs → src/Cashel.Tests/ParserTest.fs
  111. +90 −89 Cashel/Cashel.Tests/peg2_test.fs → src/Cashel.Tests/Peg2Test.fs
  112. +89 −91 Cashel/Cashel.Tests/peg_test.fs → src/Cashel.Tests/PegTest.fs
  113. +5 −0 src/Cashel.Tests/packages.config
  114. +10 −10 {Cashel → src}/Cashel/Cashel.fsproj
  115. +56 −0 src/Cashel/ListPrimitives.fs
  116. +58 −0 src/Cashel/parser.fs
  117. +57 −0 src/Cashel/primitives.fs
View
39 .gitignore
@@ -1,6 +1,35 @@
-old/*
-*.SCC
+
+#ignore thumbnails created by windows
+Thumbs.db
+#Ignore files build by Visual Studio
+*.obj
+*.exe
+*.pdb
+*.user
+*.aps
+*.pch
+*.vspscc
+*_i.c
+*_p.c
+*.ncb
*.suo
-*/*/bin/*
-*/*/obj/*
-*/*.sln.cache
+*.tlb
+*.tlh
+*.bak
+*.cache
+*.ilk
+*.log
+[Bb]in
+[Dd]ebug*/
+*.lib
+*.sbr
+obj/
+[Rr]elease*/
+_ReSharper*/
+[Tt]est[Rr]esult*
+build/
+deploy/
+docs/
+tools/FAKE/templates/
+test/
+*_Spliced.*
View
14 Cashel.nuspec
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+ <description>@description@</description>
+ <id>@project@</id>
+ <version>@build.number@</version>
+ <authors>@authors@</authors>
+ <language>en-US</language>
+ <summary>@summary@</summary>
+ <projectUrl>https://github.com/DevHawk/cashel</projectUrl>
+ <licenseUrl>https://github.com/DevHawk/cashel/blob/master/LICENSE.txt</licenseUrl>
+ <tags>build</tags>
+ </metadata>
+</package>
View
17 Cashel/Cashel.sln → Cashel.sln
@@ -1,11 +1,18 @@

-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Cashel", "Cashel\Cashel.fsproj", "{6B89DD99-F2D4-4C0B-9A9A-12AE0028EDD1}"
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Cashel", "src\Cashel\Cashel.fsproj", "{6B89DD99-F2D4-4C0B-9A9A-12AE0028EDD1}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Cashel.Tests", "Cashel.Tests\Cashel.Tests.fsproj", "{25D2AF80-078E-46A1-8EBB-01A905DBAD48}"
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Cashel.Tests", "src\Cashel.Tests\Cashel.Tests.fsproj", "{25D2AF80-078E-46A1-8EBB-01A905DBAD48}"
EndProject
-Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Cashel.Peg", "Cashel.Peg\Cashel.Peg.fsproj", "{ADA1F74D-B036-4756-967C-5E46199732C4}"
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Cashel.Peg", "src\Cashel.Peg\Cashel.Peg.fsproj", "{ADA1F74D-B036-4756-967C-5E46199732C4}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{9FE07BDE-05E7-415A-8D64-04B72E573640}"
+ ProjectSection(SolutionItems) = preProject
+ build.bat = build.bat
+ build.fsx = build.fsx
+ Cashel.nuspec = Cashel.nuspec
+ EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
View
338 Cashel/Cashel.Peg/peg.fs
@@ -1,338 +0,0 @@
-#light
-
-(*
-
-# Hierarchical syntax
-Grammar <- Spacing Definition+ EndOfFile
-Definition <- Identifier LEFTARROW Expression
-Expression <- Sequence (SLASH Sequence)*
-Sequence <- Prefix*
-Prefix <- (AND / NOT)? Suffix
-Suffix <- Primary (QUESTION / STAR / PLUS)?
-Primary <- Identifier !LEFTARROW / OPEN Expression CLOSE / Literal / Class / DOT
-
-# Lexical syntax
-Identifier <- IdentStart IdentCont* Spacing
-IdentStart <- [a-zA-Z_]
-IdentCont <- IdentStart / [0-9]
-
-Literal <- ['] (!['] Char)* ['] Spacing / [""] (![""] Char)* [""] Spacing
-Class <- '[' (!']' Range)* ']' Spacing
-Range <- Char '-' Char / Char
-Char <- '\\' [nrt'""\[\]\\] / '\\' [0-2][0-7][0-7] / '\\' [0-7][0-7]? / !'\\' .
-
-LEFTARROW <- '<-' Spacing
-SLASH <- '/' Spacing
-AND <- '&' Spacing
-NOT <- '!' Spacing
-QUESTION <- '?' Spacing
-STAR <- '*' Spacing
-PLUS <- '+' Spacing
-OPEN <- '(' Spacing
-CLOSE <- ')' Spacing
-DOT <- '.' Spacing
-
-Spacing <- (Space / Comment)*
-Comment <- '#' (!EndOfLine .)* EndOfLine
-Space <- ' ' / '\t' / EndOfLine
-EndOfLine <- '\r\n' / '\n' / '\r'
-EndOfFile <- !.
-
-*)
-
-
-namespace DevHawk.Parser
-
-module Peg
-
-//---------------------------------------------------------------------------------------------
-//AST Types
-
-let rec L2S (input : char list) =
- new System.String(List.to_array input)
-
-///AST Type for Range production
-type Range =
-| Single of char
-| Dual of char * char
- with
- override this.ToString() =
- match this with
- | Single x -> sprintf "Range.Single (%A)" x
- | Dual (x,y) -> sprintf "Range.Dual (%A,%A)" x y
-
-///AST Type for Suffix production
-type Suffix =
-| Question
-| Star
-| Plus
- with
- override this.ToString() =
- match this with
- | Question -> "Suffix.Question"
- | Star -> "Suffix.Star"
- | Plus -> "Suffix.Plus"
-
-///AST Type for Prefix production
-type Prefix =
-| And
-| Not
- with
- override this.ToString() =
- match this with
- | And -> "Prefix.And"
- | Not -> "Prefix.Not"
-
-///AST Type for Primary production
-type Primary =
-| Identifier of char list
-| Expression of Expression
-| Literal of char list
-| Class of Range list
-| Dot
- with
- static member Exp2Str (exp : Expression) =
- let sb = new System.Text.StringBuilder()
- for sequence in exp do
- sb.Append(" Sequence") |> ignore
- for si in sequence do
- sb.AppendFormat(" {0}", si) |> ignore
- sb.ToString()
- override this.ToString() =
- match this with
- | Identifier i -> sprintf "Primary.Identifier %s" (L2S i)
- | Expression e -> sprintf "Primary.Expression %s" (Primary.Exp2Str e)
- | Literal l -> sprintf "Primary.Literal %s" (L2S l)
- | Class rl ->
- let sb = new System.Text.StringBuilder("Primary.Class ")
- for r in rl do
- sb.AppendFormat("{0}, ", r) |> ignore
- sb.ToString()
- | Dot -> "Primary.Dot"
-
-///AST Type for Sequence Item production
-and SequenceItem =
- {
- primaryItem: Primary;
- itemPrefix: Prefix option;
- itemSuffix: Suffix option;
- }
- with
- override this.ToString() =
- let sb = new System.Text.StringBuilder("SequenceItem ")
- if Option.isSome this.itemPrefix then
- sb.AppendFormat("{0} ", (Option.get this.itemPrefix)) |> ignore
- sb.Append(this.primaryItem) |> ignore
- if Option.isSome this.itemSuffix then
- sb.AppendFormat(" {0}", (Option.get this.itemSuffix)) |> ignore
- sb.ToString()
-
-and Sequence = SequenceItem list
-
-and Expression = Sequence list
-
-///AST Type for Definition production
-type Definition =
- {
- name: char list;
- exp: Expression;
- }
- with
- override this.ToString() =
- sprintf "Definition (name: %A, exp: %A)" (L2S this.name) (Primary.Exp2Str this.exp)
-
-//---------------------------------------------------------------------------------------------
-
-open DevHawk.Parser.Core
-open DevHawk.Parser.Primitives
-
-///EndOfFile <- !.
-let EndOfFile = eof
-
-///EndOfLine <- '\r\n' / '\n' / '\r'
-let EndOfLine = parser {
- return! items_equal (List.of_seq "\r\n")
- return! item_equal '\n' |> listify
- return! item_equal '\r' |> listify }
-
-///Space <- ' ' / '\t' / EndOfLine
-let Space = parser {
- return! item_equal ' ' |> listify
- return! item_equal '\t' |> listify
- return! EndOfLine }
-
-///Comment <- '#' (!EndOfLine .)* EndOfLine
-let Comment = parser {
- do! skip_item '#'
- let! c = repeat_until item EndOfLine
- return c }
-
-///Spacing <- (Space / Comment)*
-let Spacing = parser {
- return! Space
- return! Comment } |> repeat
-
-///DOT <- '.' Spacing
-let DOT = item_equal '.' .>> Spacing
-
-///SLASH <- '/' Spacing
-let SLASH = item_equal '/' .>> Spacing
-
-///AND <- '&' Spacing
-let AND = item_equal '&' .>> Spacing
-
-///NOT <- '!' Spacing
-let NOT = item_equal '!' .>> Spacing
-
-///QUESTION <- '?' Spacing
-let QUESTION = item_equal '?' .>> Spacing
-
-///STAR <- '*' Spacing
-let STAR = item_equal '*' .>> Spacing
-
-///PLUS <- '+' Spacing
-let PLUS = item_equal '+' .>> Spacing
-
-///OPEN <- '(' Spacing
-let OPEN = item_equal '(' .>> Spacing
-
-///CLOSE <- ')' Spacing
-let CLOSE = item_equal ')' .>> Spacing
-
-///LEFTARROW <- '<-' Spacing
-let LEFTARROW = items_equal (List.of_seq "<-") .>> Spacing
-
-///Char <- '\\' [nrt'""\[\]\\] / '\\' [0-2][0-7][0-7] / '\\' [0-7][0-7]? / !'\\' .
-let Char =
- let c2i c = int c - int '0'
-
- parser {
- do! skip_item '\\'
- let! c = any_of ['n';'r';'t';'''; '"'; '['; ']'; '\\']
- match c with
- | 'n' -> return '\n'
- | 'r' -> return '\r'
- | 't' -> return '\t'
- | _ -> return c }
- +++
- parser {
- do! skip_item '\\'
- let! c1 = any_of ['0'..'2']
- let! c2 = any_of ['0'..'7']
- let! c3 = any_of ['0'..'7']
- return char ((c2i c1)*64 + (c2i c2)*8 + (c2i c3)) }
- +++
- parser {
- do! skip_item '\\'
- let! c1 = any_of ['0'..'7']
- let! c2 = !? (any_of ['0'..'7'])
- match c2 with
- | Some(c2) -> return char ((c2i c1)*8 + (c2i c2))
- | None -> return char (c2i c1) }
- +++
- parser {
- do! !~ (item_equal '\\')
- return! item }
-
-///Range <- Char '-' Char / Char
-let Range =
- parser {
- let! c1 = Char
- do! skip_item '-'
- let! c2 = Char
- return Dual(c1, c2) }
- +++
- parser {
- let! c1 = Char
- return Single(c1) }
-
-///Class <- '[' (!']' Range)* ']' Spacing
-let Class =
- parser {
- do! skip_item '['
- let! rl = repeat_until Range (item_equal ']')
- do! forget Spacing
- return rl
- }
-
-///Literal <- ['] (!['] Char)* ['] Spacing / ["] (!["] Char)* [""] Spacing
-let Literal =
- let literal_workhorse ch = parser {
- do! skip_item ch
- let! cl = repeat_until Char (item_equal ch)
- do! forget Spacing
- return cl }
- literal_workhorse ''' +++ literal_workhorse '"'
-
-
-///Identifier <- IdentStart IdentCont* Spacing
-//IdentStart <- [a-zA-Z_]
-//IdentCont <- IdentStart / [0-9]
-let Identifier =
- let IdentStart = any_of (['a'..'z']@['A'..'Z']@['_'])
- let IdentCont = IdentStart +++ any_of ['0'..'9']
-
- parser {
- let! c = IdentStart
- let! cs = repeat IdentCont
- do! forget Spacing
- return c::cs }
-
-
-///Primary <- Identifier !LEFTARROW / OPEN Expression CLOSE / Literal / Class / DOT
-//Had to name this method pPrimary to avoid conflict with Primary discriminated union
-let rec pPrimary =
- parser {
- let! id = Identifier
- do! !~ LEFTARROW
- return Primary.Identifier(id) }
- +++
- parser {
- do! forget OPEN
- let! exp = Expression
- do! forget CLOSE
- return Primary.Expression(exp) }
- +++
- parser {
- let! lit = Literal
- return Primary.Literal(lit) }
- +++
- parser {
- let! cls = Class
- return Primary.Class(cls) }
- +++
- (DOT >>$ Dot)
-
-
-///SequenceItem <- (AND / NOT)? Primary (QUESTION / STAR / PLUS)?
-and SequenceItem =
- let prefix = (AND >>$ Prefix.And) +++ (NOT >>$ Prefix.Not)
- let suffix = (QUESTION >>$ Suffix.Question) +++ (STAR >>$ Suffix.Star) +++ (PLUS >>$ Suffix.Plus)
- parser {
- let! pre = !? prefix
- let! pri = pPrimary
- let! suf = !? suffix
- return {primaryItem=pri;itemPrefix=pre;itemSuffix=suf} }
-
-///Sequence <- SequenceItem*
-and Sequence = repeat SequenceItem
-
-///Expression <- Sequence (SLASH Sequence)*
-and Expression =
- parser {
- let! s = Sequence
- let! sl = repeat (SLASH >>. Sequence)
- return s::sl }
-
-///Definition <- Identifier LEFTARROW Expression
-let Definition =
- parser {
- let! id = Identifier
- do! forget LEFTARROW
- let! ex = Expression
- return {name=id;exp=ex} }
-
-///Grammar <- Spacing Definition+ EndOfFile
-let Grammar = Spacing >>. repeat1 Definition .>> EndOfFile
-
-
View
442 Cashel/Cashel.Peg/peg2.fs
@@ -1,442 +0,0 @@
-#light
-
-(*
-
-# Hierarchical syntax
-Grammar <- Spacing Identifier OCURLY Rule+ CCURLY EndOfFile
-Rule <- Identifier LEFTARROW Production (SLASH Production)* SEMICOLON
-Production <- PatternItem+ (RIGHTARROW Action)?
-Suffix <- QUESTION / STAR / PLUS
-Prefix <- AND / NOT / Identifier COLON
-PatternItem <- Prefix? Primary Suffix?
-
-#Identifier is fake right now
-Action <- Identifier
-
-#no longer can have multiple choices inside a parens. Instead, you can assoicate an action
-Primary <- Identifier / OPEN Production CLOSE / Literal / Class / DOT
-
-# Lexical syntax
-Identifier <- IdentStart IdentCont* Spacing
-IdentStart <- [a-zA-Z_]
-IdentCont <- IdentStart / [0-9]
-
-Literal <- ['] (!['] Char)* ['] Spacing / [""] (![""] Char)* [""] Spacing
-Class <- '[' (!']' Range)* ']' Spacing
-Range <- Char '-' Char / Char
-#change char to unicode escape sequence \uxxxx
-Char <- '\\' [nrt'""\[\]\\] / '\\u' HexDigit HexDigit HexDigit HexDigit / !'\\' .
-
-HexDigit <- [a-fA-F0-9]
-
-LEFTARROW <- '<-' Spacing
-RIGHTARROW <- '=>' Spacing
-COLON <- ':' ! Spacing
-SLASH <- '/' Spacing
-AND <- '&' Spacing
-NOT <- '!' Spacing
-QUESTION <- '?' Spacing
-STAR <- '*' Spacing
-PLUS <- '+' Spacing
-OPEN <- '(' Spacing
-CLOSE <- ')' Spacing
-DOT <- '.' Spacing
-OCURLY <- '{' Spacing
-CCURLY <- '}' Spacing
-
-Spacing <- (Space / Comment)*
-Comment <- '#' (!EndOfLine .)* EndOfLine
-Space <- ' ' / '\t' / EndOfLine
-EndOfLine <- '\r\n' / '\n' / '\r'
-EndOfFile <- !.
-
-*)
-
-
-namespace DevHawk.Parser
-module Peg2
-
-//---------------------------------------------------------------------------------------------
-//Utility Functions
-
-let List2String cl =
- let sb = cl |> List.fold_left (fun (s:System.Text.StringBuilder) (c : char) -> s.Append(c)) (new System.Text.StringBuilder())
- sb.ToString()
-
-let ListFoldString l = l |> List.fold_left (fun s p -> sprintf "%s %O" s p) ""
-
-type StrBuilder = System.Text.StringBuilder
-let append (txt:string) (sb:StrBuilder) = sb.Append(txt)
-let appendChar (c:char) (sb:StrBuilder) = sb.Append(c)
-let appendList l func sb =
- l |> List.iter (fun x -> sb |> func x |> ignore)
- sb
-let appendOption v func sb =
- match v with
- | Some(v) -> sb |> func v
- | None -> sb
-
-let tostr o = o.ToString()
-let replace_ws (s:string) = s.Replace("\r", "\\r").Replace("\n", "\\n").Replace("\t", "\\t")
-
-//---------------------------------------------------------------------------------------------
-//AST Types
-
-type Range =
-| Single of char
-| Dual of char * char
- with
- override this.ToString() = new StrBuilder() |> Range.BuildString this |> tostr
- static member BuildString (r:Range) (sb:StrBuilder) =
- match r with
- | Single x -> sb |> appendChar x
- | Dual (x,y) -> sb |> appendChar x |> appendChar '-' |> appendChar y
-
-type Arity =
-| ZeroOrOne
-| ZeroOrMore
-| OneOrMore
- with
- override this.ToString() = new StrBuilder() |> Arity.BuildString this |> tostr
- static member BuildString (a:Arity) (sb:StrBuilder) =
- match a with
- | ZeroOrOne -> sb |> appendChar '?'
- | ZeroOrMore -> sb |> appendChar '*'
- | OneOrMore -> sb |> appendChar '+'
-
-type Prefix =
-| SuccessPredicate
-| FailurePredicate
-| Variable of string
- with
- override this.ToString() = new StrBuilder() |> Prefix.BuildString this |> tostr
- static member BuildString (p:Prefix) (sb:StrBuilder) =
- match p with
- | SuccessPredicate -> sb |> appendChar '&'
- | FailurePredicate -> sb |> appendChar '!'
- | Variable s -> sb |> append s |> appendChar ':'
-
-///Action type not defined yet. Using string as a stub
-type Action = string //TBD
-
-///A Primary can be an Identifier, Production list,
-type Primary =
-| Identifier of string
-| Production of Production
-| Literal of string
-| Class of Range list
-| Dot
- with
- override this.ToString() = new StrBuilder() |> Primary.BuildString this |> tostr
- static member BuildString (p:Primary) (sb:StrBuilder) =
- match p with
- | Identifier s -> sb |> append s
- | Production p -> sb |> appendChar '(' |> Production.BuildString p |> appendChar ')'
- | Literal s -> sb |> appendChar '\"' |> append (replace_ws s) |> appendChar '\"'
- | Class rl -> sb |> appendChar '[' |> appendList rl Range.BuildString |> appendChar ']'
- | Dot -> sb |> append "."
-
-///A PatternItem is a Primary with an optional prefix and/or optional suffix
-and PatternItem =
- {
- item: Primary;
- prefix: Prefix option;
- arity: Arity option;
- }
- with
- override this.ToString() = new StrBuilder() |> PatternItem.BuildString this |> tostr
- static member BuildString (p:PatternItem) (sb:StrBuilder) =
- sb |> appendOption p.prefix Prefix.BuildString |> Primary.BuildString p.item |> appendOption p.arity Arity.BuildString
-
-
-///A Production is a list of Pattern Items and an assoicated optional Action
-and Production =
- {
- pattern: PatternItem list;
- action: Action option;
- }
- with
- override this.ToString() = new StrBuilder() |> Production.BuildString this |> tostr
- static member BuildString (prod:Production) (sb:StrBuilder) =
- sb |> appendList prod.pattern (fun pi sb -> sb |> PatternItem.BuildString pi |> appendChar ' ') |> appendOption prod.action (fun a sb -> sb |> append "=> " |> append a)
-
-///A Rule is a named list of Productions (in decending priority choice order)
-type Rule =
- {
- name: string;
- productions: Production list;
- }
- with
- override this.ToString() = new StrBuilder() |> Rule.BuildString this |> tostr
- static member BuildString (r:Rule) (sb:StrBuilder) =
- let appendProductions sb =
- match r.productions with
- | hd::tl ->
- sb |> Production.BuildString hd |> appendList tl (fun p sb -> sb |> append " /\n\t\t" |> Production.BuildString p |> ignore)
- | _ -> sb
- sb |> append "\t" |> append r.name |> append " <- " |> appendProductions |> append ";\n"
-
-
-///A Grammar is a named list of Rules
-type Grammar =
- {
- name: string;
- rules: Rule list;
- }
- with
- override this.ToString() = new StrBuilder() |> Grammar.BuildString this |> tostr
- static member BuildString (g:Grammar) (sb:StrBuilder) =
- sb |> append g.name |> append "\n{\n" |> appendList g.rules Rule.BuildString |> append "\n}\n"
-
-
-
-
-//---------------------------------------------------------------------------------------------
-
-open DevHawk.Parser.Core
-open DevHawk.Parser.Primitives
-
-let _EndOfFile = !~ item
-
-///EndOfLine <- '\r\n' / '\n' / '\r'
-let _EndOfLine = parser {
- return! items_equal (List.of_seq "\r\n")
- return! item_equal '\n' |> listify
- return! item_equal '\r' |> listify } |> forget
-
-///Space <- ' ' / '\t' / EndOfLine
-let _Space = parser {
- return! item_equal ' ' |> forget
- return! item_equal '\t' |> forget
- return! _EndOfLine } |> forget
-
-///SlashComment <- '//' (!EndOfLine .)* EndOfLine
-let _SlashComment = parser {
- do! skip_items ['/';'/']
- do! repeat_until item _EndOfLine |> forget
- return () }
-
-///Comment <- '#' (!EndOfLine .)* EndOfLine
-let _Comment = parser {
- do! skip_item '#'
- do! repeat_until item _EndOfLine |> forget
- return () }
-
-///Spacing <- (Space / Comment)*
-let _Spacing = forget (parser {
- return! _Space
- return! _SlashComment
- return! _Comment } |> repeat)
-
-let parse p = _Spacing >>. p
-let token p = forget (p .>> _Spacing)
-
-///DOT <- '.' Spacing
-let _DOT = token (item_equal '.')
-
-///OPEN <- '(' Spacing
-let _OPAREN = token (item_equal '(')
-
-///CLOSE <- ')' Spacing
-let _CPAREN = token (item_equal ')')
-
-///AND <- '&' Spacing
-let _AND = token (item_equal '&')
-
-///NOT <- '!' Spacing
-let _NOT = token (item_equal '!')
-
-///QUESTION <- '?' Spacing
-let _QUESTION = token (item_equal '?')
-
-///STAR <- '*' Spacing
-let _STAR = token (item_equal '*')
-
-///PLUS <- '+' Spacing
-let _PLUS = token (item_equal '+')
-
-///COLON <- ':' Spacing
-let _COLON = token (item_equal ':')
-
-///SEMICOLON <- ';' Spacing
-let _SEMICOLON = token (item_equal ';')
-
-///RIGHTARROW <- '=>' Spacing
-let _RIGHTARROW = token (items_equal (List.of_seq "=>"))
-
-///SLASH <- '/' Spacing
-let _SLASH = token (item_equal '/')
-
-///OPEN <- '(' Spacing
-let _OCURLY = token (item_equal '{')
-
-///CLOSE <- ')' Spacing
-let _CCURLY = token (item_equal '}')
-
-///LEFTARROW <- '<-' Spacing
-let _LEFTARROW = token (items_equal (List.of_seq "<-"))
-
-
-///Char <- '\\' [nrt'""\[\]\\] / '\\u' [a-fA-F0-9] [a-fA-F0-9] [a-fA-F0-9] [a-fA-F0-9] / !'\\' .
-let _Char =
- ///HexDigit <- [a-fA-F0-9]
- let _HexDigit = any_of (['a'..'f'] @ ['A'..'F'] @ ['0'..'9'])
-
- let hex2int c =
- let c = System.Char.ToUpper(c)
- if System.Char.IsDigit(c) then int c - int '0'
- elif 'A' <= c && c <= 'F' then int c - int 'A' + 10
- else failwith "Invalid Hex Digit"
-
- parser {
- do! skip_item '\\'
- let! c = any_of ['n';'r';'t';'''; '"'; '['; ']'; '\\']
- match c with
- | 'n' -> return '\n'
- | 'r' -> return '\r'
- | 't' -> return '\t'
- | _ -> return c }
- +++
- parser {
- do! skip_item '\\'
- do! skip_item 'u'
- let! h1 = _HexDigit
- let! h2 = _HexDigit
- let! h3 = _HexDigit
- let! h4 = _HexDigit
- return char ((hex2int h1)*4096 + (hex2int h2)*256 + (hex2int h3)*16 + (hex2int h4)) }
- +++
- parser {
- do! !~ (item_equal '\\')
- return! item }
-
-///Range <- Char '-' Char / Char
-let _Range =
- parser {
- let! c1 = _Char
- do! skip_item '-'
- let! c2 = _Char
- return Dual(c1, c2) }
- +++
- parser {
- let! c1 = _Char
- return Single(c1) }
-
-///Class <- '[' (!']' Range)* ']' Spacing
-let _Class =
- parser {
- do! skip_item '['
- let! rl = repeat_until _Range (item_equal ']')
- do! forget _Spacing
- return rl
- }
-
-///Literal <- ['] (!['] Char)* ['] Spacing / ["] (!["] Char)* [""] Spacing
-let _Literal =
- let literal_workhorse ch =
- parser {
- do! skip_item ch
- let! cl = repeat_until _Char (item_equal ch)
- do! forget _Spacing
- return List2String cl }
- literal_workhorse ''' +++ literal_workhorse '"'
-
-
-///Identifier <- [a-zA-Z_] ([_a-zA-Z0-9])* Spacing
-let _Identifier =
- parser {
- let! c = any_of (['_'] @ ['a'..'z'] @ ['A'..'Z'])
- let! cs = repeat (any_of (['_'] @ ['a'..'z'] @ ['A'..'Z'] @ ['0'..'9']))
- do! forget _Spacing
- return List2String (c::cs) }
-
-//Stub out Action for now
-let _Action = _Identifier
-
-///Primary <- Identifier / OPEN Production CLOSE / Literal / Class / DOT
-//Had to name this method pPrimary to avoid conflict with Primary discriminated union
-let rec _Primary =
- parser {
- let! id = _Identifier
- return Identifier(id) }
- +++
- parser {
- do! forget _OPAREN
- let! prod = _Production
- do! forget _CPAREN
- return Production(prod) }
- +++
- parser {
- let! lit = _Literal
- return Literal(lit) }
- +++
- parser {
- let! cls = _Class
- return Class(cls) }
- +++
- (_DOT >>$ Dot )
-
-
-///Suffix <- QUESTION / STAR / PLUS
-///Prefix <- AND / NOT / Identifier COLON
-///PatternItem <- Prefix? Primary Suffix?
-and _PatternItem =
- let _Prefix =
- (_AND >>$ SuccessPredicate)
- +++
- (_NOT >>$ FailurePredicate)
- +++
- parser {
- let! id = _Identifier
- do! _COLON |> forget
- return Variable(id) }
-
- let _Arity =
- (_QUESTION >>$ ZeroOrOne)
- +++
- (_STAR >>$ ZeroOrMore)
- +++
- (_PLUS >>$ OneOrMore)
-
- parser {
- let! pre = !? _Prefix
- let! pri = _Primary
- let! suf = !? _Arity
- return {item=pri;prefix=pre;arity=suf} }
-
-///Production <- PatternItem+ (RIGHTARROW Action)?
-and _Production =
- parser {
- let! pl = repeat1 _PatternItem
- let! a = !? (_RIGHTARROW >>. _Action)
- return {pattern=pl; action=a} }
-
-///Rule <- Identifier LEFTARROW Production (SLASH Production)* SEMICOLON
-let _Rule =
- parser {
- let! id = _Identifier
- do! forget _LEFTARROW
- let! p = _Production
- let! pl = repeat (_SLASH >>. _Production)
- do! forget _SEMICOLON
- return {name=id;productions=p::pl} }
-
-///Grammar <- Spacing Identifier OCURLY Rule+ CCURLY EndOfFile
-let _Grammar =
- parser {
- do! forget _Spacing
- let! id = _Identifier
- do! _OCURLY
- let! rl = repeat1 _Rule
- do! _CCURLY
- do! _EndOfFile
- return {name=id; rules=rl} }
-
-let Parse (input:string) =
- let g = _Grammar (List.of_seq input)
- match g with
- | Some(g, []) -> Some(g)
- | _ -> None
-
-
-
View
186 Cashel/Cashel.Tests/primitives_test.fs
@@ -1,186 +0,0 @@
-#light
-
-let (!!) str = List.of_seq str
-
-open Xunit
-open FsxUnit.Syntax
-
-open DevHawk.Parser.Primitives
-
-[<Fact>]
-let test_item () =
- let exp = Some('t', !!"est")
- item !!"test" |> should equal exp
-
-[<Fact>]
-let test_item_empty_list () =
- item [] |> should equal None
-
-[<Fact>]
-let test_item_single_item () =
- let exp = Some('t', [])
- item ['t'] |> should equal exp
-
-[<Fact>]
-let test_ignore_with_item () =
- let exp = Some((), !!"est")
- forget item !!"test" |> should equal exp
-
-[<Fact>]
-let test_listify_with_item () =
- let exp = Some(['t'], !!"est")
- listify item !!"test" |> should equal exp
-
-[<Fact>]
-let test_satisy_simple_predicate () =
- let exp = Some('t', !!"est")
- satisfy item (fun x -> x = 't') !!"test" |> should equal exp
-
-[<Fact>]
-let test_satisy_failure_predicate () =
- satisfy item (fun x -> x = 'e') !!"test" |> should equal None
-
-[<Fact>]
-let test_any_of_success_predicate () =
- any_of ['q'..'v'] !!"test" |> should equal (Some('t', !!"est"))
-
-[<Fact>]
-let test_any_of_failure_predicate () =
- any_of ['a'..'e'] !!"test" |> should equal None
-
-[<Fact>]
-let test_item_equal () =
- item_equal 't' !!"test" |> should equal (Some('t', !!"est"))
-
-[<Fact>]
-let test_item_equal_failure () =
- item_equal 'e' !!"test" |> should equal None
-
-[<Fact>]
-let test_items_equal () =
- items_equal !!"test" !!"test me" |> should equal (Some(!!"test", !!" me"))
-
-[<Fact>]
-let test_items_equal_failue () =
- items_equal !!"test" !!"tesp me" |> should equal None
-
-[<Fact>]
-let test_eof () =
- eof [] |> should equal (Some((),[]))
-
-[<Fact>]
-let test_eof_fails_not_at_end () =
- eof !!"test" |> should equal None
-
-[<Fact>]
-let test_repeat () =
- repeat (item_equal 't') !!"ttttest" |> should equal (Some(!!"tttt", !!"est"))
-
-[<Fact>]
-let test_repeat_one_match() =
- repeat (item_equal 't') !!"test" |> should equal (Some(['t'], !!"est"))
-
-[<Fact>]
-let test_repeat_no_matches () =
- repeat (item_equal 'e') !!"ttttest" |> should equal (Some([], !!"ttttest"))
-
-[<Fact>]
-let test_repeat1 () =
- repeat1 (item_equal 't') !!"ttttest" |> should equal (Some(!!"tttt", !!"est"))
-
-[<Fact>]
-let test_repeat1_one_match() =
- repeat1 (item_equal 't') !!"test" |> should equal (Some(['t'], !!"est"))
-
-[<Fact>]
-let test_repeat1_no_matches () =
- repeat1 (item_equal 'e') !!"ttttest" |> should equal None
-
-[<Fact>]
-let test_failure_predicate_parser_success() =
- !~ (item_equal 't') !!"test" |> should equal None
-
-[<Fact>]
-let test_failure_predicate_parser_fails () =
- !~ (item_equal 'e') !!"test" |> should equal (Some((), !!"test"))
-
-[<Fact>]
-let test_Success_predicate_parser_success() =
- !& (item_equal 't') !!"test" |> should equal (Some((), !!"test"))
-
-[<Fact>]
-let test_success_predicate_parser_fails () =
- !& (item_equal 'e') !!"test" |> should equal None
-
-[<Fact>]
-let test_option_predicate_one () =
- !? (item_equal 't') !!"test" |> should equal (Some(Some('t'), !!"est"))
-
-[<Fact>]
-let test_option_predicate_zero () =
- !? (item_equal 'e') !!"test" |> should equal (Some(None, !!"test"))
-
-[<Fact>]
-let test_ignore_left () =
- ((item_equal 't') .>> (item_equal 'e')) !!"test" |> should equal (Some('t', !!"st"))
-
-[<Fact>]
-let test_ignore_left_fails () =
- ((item_equal 'e') .>> (item_equal 'e')) !!"test" |> should equal None
-
-[<Fact>]
-let test_ignore_right () =
- ((item_equal 't') >>. (item_equal 'e')) !!"test" |> should equal (Some('e', !!"st"))
-
-[<Fact>]
-let test_ignore_right_fails () =
- ((item_equal 't') >>. (item_equal 's')) !!"test" |> should equal None
-
-[<Fact>]
-let test_parse_return_value () =
- ((item_equal 't') >>$ "hello") !!"test" |> should equal (Some("hello", !!"est"))
-
-[<Fact>]
-let test_parse_return_value_fails () =
- ((item_equal 'q') >>$ "hello") !!"test" |> should equal None
-
-[<Fact>]
-let test_repeat_until () =
- (repeat_until item (item_equal 's')) !!"test" |> should equal (Some(!!"te", !!"t"))
-
-[<Fact>]
-let test_repeat_until_fail_1 () =
- (repeat_until item (item_equal 'q')) !!"test" |> should equal None
-
-[<Fact>]
-let test_repeat_until_fail_2 () =
- (repeat_until (item_equal 'q') (item_equal 's')) !!"test" |> should equal None
-
-[<Fact>]
-let test_skip_item () =
- let exp = Some((), !!"est")
- skip_item 't' !!"test" |> should equal exp
-
-[<Fact>]
-let test_skip_item_fail () =
- skip_item 'e' !!"test" |> should equal None
-
-[<Fact>]
-let test_skip_items () =
- let exp = Some((), !!"st")
- skip_items !!"te" !!"test" |> should equal exp
-
-[<Fact>]
-let test_skip_items_fail () =
- skip_items !!"ts" !!"test" |> should equal None
-
-[<Fact>]
-let test_space () =
- let exp = Some (' ', !!" test")
- space !!" test" |> should equal exp
-
-[<Fact>]
-let test_tab () =
- let exp = Some ('\t', !!" test")
- space !!"\t test" |> should equal exp
-
View
44 Cashel/Cashel/parser.fs
@@ -1,44 +0,0 @@
-// Turn on the lightweight syntax
-#light
-
-namespace DevHawk.Parser
-
-module Core
-
-type Parser<'input, 'result> = 'input -> ('result * 'input) option
-
-//I define the monadic operators (zero, result, bind & choice) as individual
-//functions so I can use them outside the parse monad
-let result v : Parser<'i,'r> = fun input -> Some(v, input)
-
-let bind p f : Parser<'i,'r> =
- fun input ->
- match p input with
- | Some(value, input) -> f value input
- | None -> None
-
-let zero : Parser<'i,'r> = fun input -> None
-
-let choice p q : Parser<'i,'r> =
- fun input ->
- match p input with
- | Some(v) -> Some(v)
- | None -> q input
-
-//I define infix operator versions of bind and choice to make it more
-//convienent to call
-let (>>=) = bind
-let (+++) = choice
-
-//Here's the parser monad definition
-type ParserBuilder() =
- member w.Delay(f) = fun input -> f () input
- member w.Zero() = zero
- member w.Return(v) = result v
- member w.Bind(p, f) = p >>= f
- member w.Combine(p1,p2) = p1 +++ p2
-
-let parser = ParserBuilder()
-
-
-
View
113 Cashel/Cashel/primitives.fs
@@ -1,113 +0,0 @@
-#light
-
-namespace DevHawk.Parser
-
-module Primitives
-
-open DevHawk.Parser.Core
-
-//-------------------------Basic primitives----------------------------------------------------
-//These primitives make no assumption as to the basic types of the parser input or result types
-
-///Custom bind operator >>$ binds parser p to result v, ignoring the return value of p
-let (>>$) p v = p >>= (fun _ -> result v)
-
-///Custom bind operator .>> binds p1 to p2, then returns the parse value of p1
-let (.>>) p1 p2 = p1 >>= (fun v -> p2 >>= (fun _ -> result v))
-
-///Custom bind operator .>> binds p1 to p2, then returns the parse value of p2
-let (>>.) p1 p2 = p1 >>= (fun _ -> p2 >>= (fun v -> result v))
-
-///forget tosses the result of parsing function p
-let forget p = p >>$ ()
-
-///listify turns the result of parsing function p into a single item list
-let listify p = p >>= (fun x -> result [x])
-
-///satisfy checks the value returned from item against the predicate function p
-let satisfy parser pred = parser >>= (fun x -> if pred x then result x else zero)
-
-///repeat looks for zero or more instances of the parsing function p
-let rec repeat p = (repeat1 p) +++ (result [])
-
-///repeat1 looks for one or more instances of the parsing function p
-and repeat1 p = p >>= (fun x -> repeat p >>= (fun xs -> result (x::xs)))
-
-///Success Predicate
-let (!&) f =
- fun input ->
- match f input with
- | Some(_) -> Some((),input)
- | None -> None
-
-///Failure Predicate
-let (!~) f =
- fun input ->
- match f input with
- | None -> Some((),input)
- | Some(_) -> None
-
-///Option Predicate
-let (!?) f =
- fun input ->
- match f input with
- | Some(v,input') -> Some(Some(v),input')
- | None -> Some(None, input)
-
-///repeat_until calls p1 repeatedly until p2 succeeds
-let repeat_until p1 p2 = repeat (!~ p2 >>. p1) .>> p2
-
-
-//-------------------------List primitives-------------------------------------------
-///item assumes the input is a list and returns a tuple of the head and tail
-let item : Parser<'a list, 'a> =
- fun input ->
- match input with
- | x::xs -> Some(x,xs)
- | [] -> None
-
-///eof checks that we're at the end of the list being parsed
-let eof : Parser<'a list, unit> =
- fun input ->
- match input with
- | [] -> Some((), [])
- | _ -> None
-
-///any_of checks the value at the start of the input is in the list of items l
-let any_of l = satisfy item (fun x -> l |> List.exists (fun y -> x = y))
-
-///item_equal checks the value at the start of the input matches the value v
-let item_equal v = satisfy item (fun x -> x = v)
-
-///items_equal recursively uses item_equal to check to see if a list of values l matches the start of the input
-let rec items_equal l =
- match l with
- | [] -> result []
- | x::xs -> item_equal x >>= (fun i -> items_equal xs >>= (fun is -> result (i::is)))
-
-///skip_item calls item_equal but tosses the parse value
-let skip_item v = item_equal v |> forget
-
-///skip_items calls items_equal but tosses the parse value
-let skip_items l = items_equal l |> forget
-
-
-//-------------------------char list primitives-------------------------------------------
-
-let add_line_and_col cl =
- let rec worker cl line col =
- match cl with
- | '\r'::'\n'::tail -> ('\r', line, col)::('\n', line, (col+1))::(worker tail (line+1) 1)
- | '\n'::tail -> ('\n', line, col)::(worker tail (line+1) 1)
- | '\r'::tail -> ('\r', line, col)::(worker tail (line+1) 1)
- | head::tail -> (head, line, col)::(worker tail line (col+1))
- | [] -> []
- worker cl 1 1
-
-let lowercase = any_of ['a'..'z']
-let uppercase = any_of ['A'..'Z']
-let letter = lowercase +++ uppercase
-let digit = any_of ['0'..'9']
-let digitval = digit >>= (fun d -> result (int d - int '0'))
-let space = satisfy item (System.Char.IsWhiteSpace)
-let skip_space = repeat space |> forget
View
1  Cashel/runtests.ps1
@@ -1 +0,0 @@
-..\External\xunit.console.exe Cashel.Tests\bin\Debug\Cashel.Tests.dll
View
2  External/.gitignore
@@ -1,2 +0,0 @@
-FsTest/*
-xunit.net/*
View
BIN  External/FsxUnit.dll
Binary file not shown
View
BIN  External/xunit.console.exe
Binary file not shown
View
BIN  External/xunit.dll
Binary file not shown
View
BIN  External/xunit.runner.utility.dll
Binary file not shown
View
15 LICENSE.txt
@@ -0,0 +1,15 @@
+Copyright 2009-2011
+
+ Harry Pierson (http://devhawk.net), Ryan Riley (http://panesofglass.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
View
4 build.bat
@@ -0,0 +1,4 @@
+@echo off
+cls
+"lib\FAKE\Fake.exe" "build.fsx"
+pause
View
130 build.fsx
@@ -0,0 +1,130 @@
+#I "lib/FAKE"
+#r "FakeLib.dll"
+open Fake
+open Fake.MSBuild
+
+(* properties *)
+let projectName = "Cashel"
+let version = "1.0.0"
+let projectSummary = "A simple monadic parser combinator library."
+let projectDescription = "A simple monadic parser combinator library."
+let authors = ["Harry Pierson";"Ryan Riley"]
+let mail = "ryan.riley@panesofglass.org"
+let homepage = "https://github.com/panesofglass/cashel"
+
+(* Directories *)
+let buildDir = "./build/"
+let docsDir = "./docs/"
+let deployDir = "./deploy/"
+let testDir = "./test/"
+let nugetDir = "./nuget/"
+
+(* Tools *)
+let nunitPath = "./packages/NUnit.2.5.9.10348/Tools"
+let nunitOutput = testDir + "TestResults.xml"
+let zipFileName = deployDir + sprintf "%s-%s.zip" projectName version
+
+(* files *)
+let appReferences =
+ !+ @"src\**\*.csproj"
+ ++ @"src\**\*.fsproj"
+ -- "**\*_Spliced*"
+ |> Scan
+
+let filesToZip =
+ !+ (buildDir + "/**/*.*")
+ -- "*.zip"
+ |> Scan
+
+(* Targets *)
+Target? Clean <-
+ fun _ -> CleanDirs [buildDir; testDir; deployDir; docsDir]
+
+Target? BuildApp <-
+ fun _ ->
+ if not isLocalBuild then
+ AssemblyInfo
+ (fun p ->
+ {p with
+ CodeLanguage = FSharp;
+ AssemblyVersion = buildVersion;
+ AssemblyTitle = projectName;
+ AssemblyDescription = projectDescription;
+ Guid = "1e95a279-c2a9-498b-bc72-6e7a0d6854ce";
+ OutputFileName = "./src/AssemblyInfo.fs"})
+
+ appReferences
+ |> MSBuildRelease buildDir "Build"
+ |> Log "AppBuild-Output: "
+
+Target? BuildTest <-
+ fun _ ->
+ appReferences
+ |> MSBuildDebug testDir "Build"
+ |> Log "TestBuild-Output: "
+
+Target? Test <-
+ fun _ ->
+ !+ (testDir + "/*.dll")
+ |> Scan
+ |> NUnit (fun p ->
+ {p with
+ ToolPath = nunitPath;
+ DisableShadowCopy = true;
+ OutputFile = nunitOutput})
+
+Target? GenerateDocumentation <-
+ fun _ ->
+ !+ (buildDir + "Cashel.dll")
+ |> Scan
+ |> Docu (fun p ->
+ {p with
+ ToolPath = "./lib/FAKE/docu.exe"
+ TemplatesPath = "./lib/FAKE/templates"
+ OutputPath = docsDir })
+
+Target? CopyLicense <-
+ fun _ ->
+ [ "LICENSE.txt" ] |> CopyTo buildDir
+
+Target? BuildZip <-
+ fun _ -> Zip buildDir zipFileName filesToZip
+
+Target? ZipDocumentation <-
+ fun _ ->
+ let docFiles =
+ !+ (docsDir + "/**/*.*")
+ |> Scan
+ let zipFileName = deployDir + sprintf "Documentation-%s.zip" version
+ Zip docsDir zipFileName docFiles
+
+Target? CreateNuGet <-
+ fun _ ->
+ let nugetDocsDir = nugetDir @@ "docs/"
+ let nugetToolsDir = nugetDir @@ "tools/"
+
+ XCopy docsDir nugetDocsDir
+ XCopy buildDir nugetToolsDir
+
+ NuGet (fun p ->
+ {p with
+ Authors = authors
+ Project = projectName
+ Description = projectDescription
+ OutputPath = nugetDir }) "Cashel.nuspec"
+
+Target? Default <- DoNothing
+Target? Deploy <- DoNothing
+
+// Dependencies
+For? BuildApp <- Dependency? Clean
+For? Test <- Dependency? BuildApp |> And? BuildTest
+For? GenerateDocumentation <- Dependency? BuildApp
+For? ZipDocumentation <- Dependency? GenerateDocumentation
+For? BuildZip <- Dependency? BuildApp |> And? CopyLicense
+For? CreateNuGet <- Dependency? Test |> And? BuildZip |> And? ZipDocumentation
+For? Deploy <- Dependency? Test |> And? BuildZip |> And? ZipDocumentation
+For? Default <- Dependency? Deploy
+
+// start build
+Run? Default
View
10 lib/FAKE/DocuLicense.txt
@@ -0,0 +1,10 @@
+Copyright (c) 2009, James Gregory
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * The name of James Gregory may not be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
BIN  lib/FAKE/FAKE.exe
Binary file not shown
View
8 lib/FAKE/FAKE.exe.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <appSettings>
+ <add key="MSBuildPath" value="c:\Windows\Microsoft.NET\Framework\v4.0.30319\;c:\Windows\Microsoft.NET\Framework\v4.0.30128\;c:\Windows\Microsoft.NET\Framework\v3.5\" />
+ <add key="FSIPath" value=".\tools\FSharp\;.\lib\FSharp\;[ProgramFiles]\Microsoft F#\v4.0\;[ProgramFilesX86]\Microsoft F#\v4.0\;[ProgramFiles]\FSharp-2.0.0.0\bin\;[ProgramFilesX86]\FSharp-2.0.0.0\bin\;[ProgramFiles]\FSharp-1.9.9.9\bin\;[ProgramFilesX86]\FSharp-1.9.9.9\bin\" />
+ <add key="GitPath" value="[ProgramFilesX86]\Git\bin\;[ProgramFiles]\Git\bin\" />
+ </appSettings>
+</configuration>
View
BIN  lib/FAKE/FSharp.Core.dll
Binary file not shown
View
BIN  lib/FAKE/FSharp.Core.optdata
Binary file not shown
View
BIN  lib/FAKE/FSharp.Core.sigdata
Binary file not shown
View
9,219 lib/FAKE/FSharp.Core.xml
9,219 additions, 0 deletions not shown
View
187 lib/FAKE/Fake.Gallio.XML
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc>
+<assembly><name>Fake.Gallio</name></assembly>
+<members>
+<member name="">
+
+</member>
+<member name="F:Fake.Gallio.GallioParams.Filters">
+<summary>
+ Test filters (i.e. exclusion rules)
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.ReportNameFormat">
+<summary>
+ Sets the format string to use to generate the reports filenames.
+ Any occurence of {0} will be replaced by the date, and any occurrence of {1} by the time.
+ The default format string is test-report-{0}-{1}.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.ReportDirectory">
+<summary>
+ Sets the name of the directory where the reports will be put.
+ The directory will be created if it doesn&apos;t exist. Existing files will be overwritten.
+ The default report directory is &quot;Reports&quot;.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.RuntimeVersion">
+<summary>
+ Gets or sets the version of the .Net runtime to use for running tests.
+ For the CLR, this must be the name of one of the framework directories in %SystemRoot%\Microsoft.Net\Framework. eg. &apos;v2.0.50727&apos;.
+ The default is null which uses the most recent installed and supported framework.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.Debug">
+<summary>
+ Attaches the debugger to the test process when set to true.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.ShadowCopy">
+<summary>
+ Shadow copying allows the original assemblies to be modified while the tests are running.
+ However, shadow copying may occasionally cause some tests to fail if they depend on their original location.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.WorkingDirectory">
+<summary>
+ Gets or sets the relative or absolute path of the working directory
+ or null to use a default value selected by the consumer.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.ApplicationBaseDirectory">
+<summary>
+ Gets or sets the relative or absolute path of the application base directory,
+ or null to use a default value selected by the consumer.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.PluginDirectories">
+<summary>
+ Additional Gallio plugin directories to search recursively.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.HintDirectories">
+<summary>
+ The list of directories used for loading referenced assemblies and other dependent resources.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.RunnerExtensions">
+<summary>
+ Specifies the type, assembly, and parameters of custom test runner
+ extensions to use during the test run.
+ The value must be in the form &apos;[Namespace.]Type,Assembly[;Parameters]&apos;
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.RunnerType">
+<summary>
+ The types supported &quot;out of the box&quot; are: Local, IsolatedAppDomain
+ and IsolatedProcess (default), but more types could be available as plugins.
+</summary>
+</member>
+<member name="">
+
+</member>
+<member name="F:Fake.Gallio.GallioParams.TestRunnerOptions">
+<summary>
+ Specifies option property key/value pairs for the test runner.
+</summary>
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="F:Fake.Gallio.GallioParams.ReportFormatterOptions">
+<summary>
+ Specifies option property key/value pairs for the report formatter
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.ShowReports">
+<summary>
+ Sets whether to show generated reports in a window using the default system application
+ registered to the report file type.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.RunTimeLimit">
+<summary>
+ Sets the maximum amount of time (in seconds) the tests can run
+ before they are canceled.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.IgnoreAnnotations">
+<summary>
+ Sets whether to ignore annotations when determining the result code.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.EchoResults">
+<summary>
+ Sets whether to echo results to the screen as tests finish.
+</summary>
+</member>
+<member name="F:Fake.Gallio.GallioParams.DoNotRun">
+<summary>
+ Sets whether to load the tests but not run them.
+</summary>
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="T:Fake.Gallio">
+
+</member>
+</members>
+</doc>
View
BIN  lib/FAKE/Fake.Gallio.dll
Binary file not shown
View
138 lib/FAKE/Fake.SQL.XML
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc>
+<assembly><name>Fake.SQL</name></assembly>
+<members>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="T:Fake.SQL.AssemblyInfo">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="M:Fake.SQL.SqlServer.RunScriptsFromDirectory(System.String,System.String)">
+ <summary>Runs all sql scripts from the given directory on the server.</summary>
+ <param name="connectionString">Used to open the connection to the database.</param>
+ <param name="scriptDirectory">All *.sql files inside this directory and all subdirectories will be run.</param>
+</member>
+<member name="M:Fake.SQL.SqlServer.RunScripts(System.String,System.Collections.Generic.IEnumerable{System.String})">
+ <summary>Runs the given sql scripts on the server.</summary>
+ <param name="connectionString">Used to open the connection to the database.</param>
+ <param name="scripts">The scripts which will be run.</param>
+</member>
+<member name="M:Fake.SQL.SqlServer.DropAndCreateDatabase(System.String)">
+ <summary>Drops and creates the database (dropped if db exists. created nonetheless)</summary>
+ <param name="connectionString">Used to open the connection to the database.</param>
+</member>
+<member name="M:Fake.SQL.SqlServer.ReplaceDatabaseFilesWithCache(System.String,System.String,System.String,System.Collections.Generic.IEnumerable{System.String},Microsoft.SqlServer.Management.Smo.AttachOptions)">
+ <summary>Replaces the database files from a cache.
+ If the files in the cache are not up to date, they will be refreshed.</summary>
+ <param name="connectionString">Used to open the connection to the database.</param>
+ <param name="targetDir">The directory where the attached files will live.</param>
+ <param name="cacheDir">The file cache. If the files in the cache are not up to date, they will be refreshed.</param>
+ <param name="files">The original database files.</param>
+ <param name="attachOptions">AttachOptions for Sql server.</param>
+</member>
+<member name="M:Fake.SQL.SqlServer.ReplaceDatabaseFiles(System.String,System.String,System.Collections.Generic.IEnumerable{System.String},Microsoft.SqlServer.Management.Smo.AttachOptions)">
+<summary>
+ Replaces the database files
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.replaceDatabaseFiles``1(System.String,Microsoft.SqlServer.Management.Smo.AttachOptions,Microsoft.FSharp.Core.FSharpFunc`2{Microsoft.FSharp.Core.Unit,``0})">
+<summary>
+ Replaces the database files
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.Disconnect(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ Closes the connection to the server
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.runScript(Fake.SQL.SqlServer.ServerInfo,System.String)">
+ <summary>Runs a sql script on the server.</summary>
+ <param name="serverInfo">Used as a connection to the database.</param>
+ <param name="sqlFile">The script which will be run.</param>
+</member>
+<member name="M:Fake.SQL.SqlServer.CreateDb(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ Creates a new db on the given server
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.Attach(Fake.SQL.SqlServer.ServerInfo,Microsoft.SqlServer.Management.Smo.AttachOptions,System.Collections.Generic.IEnumerable{System.String})">
+<summary>
+ Attach a database
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.Detach(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ Detach a database
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.KillAllProcesses(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ Kills all Processes
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.DropDb(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ Drops the given InitialCatalog from the server (if it exists)
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.intitialCatalogExistsOnServer(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ Checks wether the given InitialCatalog exists on the server
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.getDatabase(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ Gets the initial catalog as database instance
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.existDBOnServer(Fake.SQL.SqlServer.ServerInfo,System.String)">
+<summary>
+ Checks wether the given Database exists on the server
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.getServerName(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ Gets the name of the server
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.getDBName(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ Gets the initial catalog name
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.getDatabaseNamesFromServer(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ gets the DatabaseNames from the server
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.getDatabasesFromServer(Fake.SQL.SqlServer.ServerInfo)">
+<summary>
+ gets the DatabaseNames from the server
+</summary>
+</member>
+<member name="M:Fake.SQL.SqlServer.getServerInfo(System.String)">
+<summary>
+ Gets a connection to the SQL server and an instance to the ConnectionStringBuilder
+</summary>
+</member>
+<member name="T:Fake.SQL.SqlServer">
+
+</member>
+</members>
+</doc>
View
BIN  lib/FAKE/Fake.SQL.dll
Binary file not shown
View
3,261 lib/FAKE/FakeLib.XML
@@ -0,0 +1,3261 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc>
+<assembly><name>FakeLib</name></assembly>
+<members>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="M:Fake.AssemblyInfoHelper.AssemblyInfo(Microsoft.FSharp.Core.FSharpFunc`2{Fake.AssemblyInfoHelper.AssemblyInfoParams,Fake.AssemblyInfoHelper.AssemblyInfoParams})">
+<summary>
+ Generates an AssemblyInfo file for projects
+</summary>
+</member>
+<member name="M:Fake.AssemblyInfoHelper.generateFile(Fake.AssemblyInfoHelper.AssemblyInfoParams,System.Collections.Generic.Dictionary{System.String,System.String},System.Collections.Generic.IEnumerable{System.String},System.IO.TextWriter)">
+<summary>
+ generates the assembly info file
+</summary>
+</member>
+<member name="P:Fake.AssemblyInfoHelper.AssemblyInfoDefaults">
+<summary>
+ AssemblyInfo default params
+</summary>
+</member>
+<member name="T:Fake.AssemblyInfoHelper">
+
+</member>
+<member name="M:Fake.AsyncHelper.doParallel``2(Microsoft.FSharp.Core.FSharpFunc`2{``0,``1},System.Collections.Generic.IEnumerable{``0})">
+<summary>
+ Runs the given function on all items in parallel
+</summary>
+</member>
+<member name="T:Fake.AsyncHelper">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="T:Fake.BuildServerHelper.TraceMode">
+<summary>
+ The trace Mode type.
+</summary>
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="T:Fake.BuildServerHelper.BuildServer">
+<summary>
+ The BuildServer type.
+</summary>
+</member>
+<member name="P:Fake.BuildServerHelper.isLocalBuild">
+<summary>
+ Determines if the current build is a local build.
+</summary>
+</member>
+<member name="P:Fake.BuildServerHelper.buildServer">
+<summary>
+ Determines the current BuildVersion and if it is a local build
+</summary>
+</member>
+<member name="P:Fake.BuildServerHelper.buildVersion">
+<summary>
+ Determines the current BuildVersion and if it is a local build
+</summary>
+</member>
+<member name="P:Fake.BuildServerHelper.ccBuildLabel">
+<summary>
+ CruiseControl.NET Build label
+</summary>
+</member>
+<member name="P:Fake.BuildServerHelper.tcBuildNumber">
+<summary>
+ Build number retrieved from TeamCity
+</summary>
+</member>
+<member name="P:Fake.BuildServerHelper.xmlOutputFile">
+<summary>
+ Definces the XML output file
+ Used for BuildServers like CruiseControl.NET
+</summary>
+</member>
+<member name="P:Fake.BuildServerHelper.localBuildLabel">
+<summary>
+ A constant for local builds
+</summary>
+</member>
+<member name="P:Fake.BuildServerHelper.verbose">
+<summary>
+ Trace verbose output
+</summary>
+</member>
+<member name="T:Fake.BuildServerHelper">
+
+</member>
+<member name="M:Fake.CacheHelper.lookup``2(``0,Microsoft.FSharp.Core.FSharpFunc`2{Microsoft.FSharp.Core.Unit,``1},System.Collections.Generic.IDictionary{``0,``1})">
+<summary>
+ Looks for a key in the cache.
+ If it is not found the newValue functions is executed and the result is stored in the cache.
+</summary>
+</member>
+<member name="T:Fake.CacheHelper">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="">
+
+</member>
+<member name="P:Fake.DocuHelper.DocuDefaults">
+<summary>
+ Docu default params
+</summary>
+</member>
+<member name="T:Fake.DocuHelper">
+
+</member>
+<member name="">
+
+</member>
+<member name="P:Fake.EnvironmentHelper.documentsFolder">
+<summary>
+ The path to the personal documents
+</summary>
+</member>
+<member name="P:Fake.EnvironmentHelper.ProgramFilesX86">
+<summary>
+ The path of Program Files (x86)
+</summary>
+</member>
+<member name="P:Fake.EnvironmentHelper.ProgramFiles">
+<summary>
+ The path of Program Files - might be x64 on x64 machine
+</summary>
+</member>
+<member name="M:Fake.EnvironmentHelper.getBuildParamOrDefault(System.String,System.String)">
+<summary>
+ Returns the value of the buildParam if it is set and otherwise the default
+</summary>
+</member>
+<member name="M:Fake.EnvironmentHelper.getBuildParam(System.String)">
+<summary>
+ Returns the value of the buildParam if it is set and otherwise &quot;&quot;
+</summary>
+</member>
+<member name="M:Fake.EnvironmentHelper.hasBuildParam(System.String)">
+<summary>
+ Returns true if the buildParam is set and otherwise false
+</summary>
+</member>
+<member name="M:Fake.EnvironmentHelper.appSetting(System.String)">
+<summary>
+ Retrieves a ApplicationSettings variable
+</summary>
+</member>
+<member name="M:Fake.EnvironmentHelper.environVarOrDefault(System.String,System.String)">
+<summary>
+ Retrieves the EnvironmentVariable or a default
+</summary>
+</member>
+<member name="M:Fake.EnvironmentHelper.setEnvironVar(System.String,System.String)">
+<summary>
+ Sets the Environment variable
+</summary>
+</member>
+<member name="M:Fake.EnvironmentHelper.environVars(System.EnvironmentVariableTarget)">
+<summary>
+ Retrieves the EnvironmentVariable
+</summary>
+</member>
+<member name="M:Fake.EnvironmentHelper.op_AtAt(System.String,System.String)">
+<summary>
+ Combines to path strings
+</summary>
+</member>
+<member name="M:Fake.EnvironmentHelper.environVar(System.String)">
+<summary>
+ Retrieves the EnvironmentVariable
+</summary>
+</member>
+<member name="T:Fake.EnvironmentHelper">
+
+</member>
+<member name="M:Fake.FSIHelper.runBuildScript(System.String,System.Collections.Generic.IEnumerable{System.Tuple`2{System.String,System.String}})">
+<summary>
+ Run the given buildscript with fsi.exe
+</summary>
+</member>
+<member name="P:Fake.FSIHelper.fsiPath">
+<summary>
+ The Path to the F# interactive tool
+</summary>
+</member>
+<member name="T:Fake.FSIHelper">
+
+</member>
+<member name="M:Fake.FileHelper.CopyRecursive(System.String,System.String)">
+<summary>
+ Copies the file structure recursive
+</summary>
+</member>
+<member name="M:Fake.FileHelper.copyRecursive(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.Boolean)">
+<summary>
+ Copies the file structure recursive
+</summary>
+</member>
+<member name="M:Fake.FileHelper.GeneratePatch(System.String,System.String,System.Collections.Generic.IEnumerable{System.String})">
+ <summary>Checks the srcFiles for changes to the last release.</summary>
+ <param name="lastReleaseDir">The directory of the last release.</param>
+ <param name="patchDir">The target directory.</param>
+ <param name="srcFiles">The source files.</param>
+</member>
+<member name="M:Fake.FileHelper.GeneratePatchWithFindOldFileFunction(System.String,System.String,System.Collections.Generic.IEnumerable{System.String},Microsoft.FSharp.Core.FSharpFunc`2{System.String,Microsoft.FSharp.Core.FSharpFunc`2{System.String,System.String}})">
+ <summary>Checks the srcFiles for changes to the last release.</summary>
+ <param name="lastReleaseDir">The directory of the last release</param>
+ <param name="patchDir">The target directory</param>
+ <param name="srcFiles">The source files</param>
+ <param name="findOldFileF">A function which finds the old file</param>
+</member>
+<member name="M:Fake.FileHelper.TestDir(System.String)">
+<summary>
+ Checks if the directory exists
+</summary>
+</member>
+<member name="M:Fake.FileHelper.CompareFiles(System.Boolean,System.String,System.String)">
+<summary>
+ Compares the given files for changes
+ If delete = true then equal files will be removed
+</summary>
+</member>
+<member name="M:Fake.FileHelper.FilesAreEqual(System.IO.FileInfo,System.IO.FileInfo)">
+<summary>
+ Checks if the two files are byte-to-byte equal.
+</summary>
+</member>
+<member name="M:Fake.FileHelper.AppendTextFiles(System.String,System.Collections.Generic.IEnumerable{System.String})">
+ <summary>Appends all given files to one file.</summary>
+ <param name="newFileName">The target FileName.</param>
+ <param name="files">The original FileNames as a sequence.</param>
+</member>
+<member name="M:Fake.FileHelper.ReadCSVFile(System.String)">
+<summary>
+ Reads a csv file line by line
+ delimiter is a ,
+</summary>
+</member>
+<member name="M:Fake.FileHelper.CleanDirs(System.Collections.Generic.IEnumerable{System.String})">
+<summary>
+ Clean multiple directories
+</summary>
+</member>
+<member name="M:Fake.FileHelper.CleanDir(System.String)">
+<summary>
+ Cleans a directory
+</summary>
+</member>
+<member name="M:Fake.FileHelper.CopyDir(System.String,System.String,Microsoft.FSharp.Core.FSharpFunc`2{System.String,System.Boolean})">
+ <summary>Copies a directory recursivly.
+ If the target directory does not exist, it will be created.</summary>
+ <param name="target">The target directory.</param>
+ <param name="files">The source directory.</param>
+ <param name="filterFile">A file filter function.</param>
+</member>
+<member name="M:Fake.FileHelper.allFiles(System.String)">
+<summary>
+ Includes all files
+</summary>
+</member>
+<member name="M:Fake.FileHelper.excludeSVNFiles(System.String)">
+<summary>
+ Exclude SVN files (path with .svn)
+</summary>
+</member>
+<member name="M:Fake.FileHelper.CopyFiles(System.String,System.Collections.Generic.IEnumerable{System.String})">
+ <summary>Copies the files to the target - Alias for Copy</summary>
+ <param name="target">The target FileName.</param>
+ <param name="file">The orginal FileName.</param>
+</member>
+<member name="">
+
+</member>
+<member name="M:Fake.FileHelper.Rename(System.String,System.String)">
+ <summary>Renames the files to the target fileName.</summary>
+ <param name="target">The target FileName.</param>
+ <param name="file">The orginal FileName.</param>
+</member>
+<member name="M:Fake.FileHelper.CopyCached(System.String,System.String,System.Collections.Generic.IEnumerable{System.String})">
+<summary>
+ Copies the files from a cache folder.
+ If the files are not cached or the original files have a different write time the cache will be refreshed.
+ &lt;param name=&quot;target&quot;&gt;The target FileName.&lt;/param&gt;
+ &lt;param name=&quot;cacheDir&quot;&gt;The cache directory.&lt;/param&gt;
+ &lt;param name=&quot;files&quot;&gt;The orginal files.&lt;/param&gt;
+</summary>
+</member>
+<member name="M:Fake.FileHelper.CopyTo(System.String)">
+ <summary>Copies the given files to the target.</summary>
+ <param name="target">The target directory.</param>
+</member>
+<member name="M:Fake.FileHelper.Copy(System.String,System.Collections.Generic.IEnumerable{System.String})">
+ <summary>Copies the files to the target.</summary>
+ <param name="target">The target directory.</param>
+ <param name="files">The original FileNames as a sequence.</param>
+</member>
+<member name="M:Fake.FileHelper.CopyFile(System.String,System.String)">
+ <summary>Copies a single file to the target and overwrites the existing file.</summary>
+ <param name="target">The target directory.</param>
+ <param name="fileName">The FileName.</param>
+</member>
+<member name="M:Fake.FileHelper.CopyFileIntoSubFolder(System.String,System.String)">
+ <summary>Copies a single file to a relative subfolder of the target.</summary>
+ <param name="target">The target directory</param>
+ <param name="fileName">The fileName</param>
+</member>