Skip to content

Commit

Permalink
Fix namespacing in Reggie (it should use it's own namespace, not FSha…
Browse files Browse the repository at this point in the history
…rpLex).

Note, this commit breaks the build -- there is a compilation error in FSharpLex/Program.fs that's easy to fix but I'd like to investigate _why_ it's an error.
  • Loading branch information
jack-pappas committed Nov 8, 2015
1 parent 7fa0437 commit 1ad9660
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 43 deletions.
2 changes: 1 addition & 1 deletion FSharpLex.Tests/TestCases.fs
Expand Up @@ -61,7 +61,7 @@ type private RepositoryTestCases () =

/// The absolute path to the fsharplex executable to test.
let private toolPath =
(System.Uri (typeof<FSharpLex.CompilationOptions>.Assembly.CodeBase)).LocalPath
(System.Uri (typeof<Reggie.CompilationOptions>.Assembly.CodeBase)).LocalPath

//
[<TestCaseSource(typeof<RepositoryTestCases>, "Items")>]
Expand Down
9 changes: 5 additions & 4 deletions FSharpLex/Backend.Fslex.fs
Expand Up @@ -20,10 +20,11 @@ namespace FSharpLex.Plugin

open System.ComponentModel.Composition
open System.IO
open FSharpLex
open FSharpLex.SpecializedCollections
open FSharpLex.Ast
open FSharpLex.Compile
open Reggie
open Reggie.SpecializedCollections
open Reggie.Ast
open Reggie.Compile
open Reggie.Plugin

(* TODO : In the code-generation backends below, where the user-defined semantic actions
are emitted, it might be useful to add a bit of code which emits a single-line
Expand Down
11 changes: 6 additions & 5 deletions FSharpLex/Backend.Graph.fs
Expand Up @@ -21,11 +21,12 @@ namespace FSharpLex.Plugin
open System.ComponentModel.Composition
open System.IO
open System.Text
open FSharpLex
open FSharpLex.SpecializedCollections
open FSharpLex.Graph
open FSharpLex.Ast
open FSharpLex.Compile
open Reggie
open Reggie.SpecializedCollections
open Reggie.Graph
open Reggie.Ast
open Reggie.Compile
open Reggie.Plugin

(* TODO : Move this backend into a separate assembly so the 'fsharplex' project
won't have a dependency on System.Xml.dll. *)
Expand Down
2 changes: 1 addition & 1 deletion FSharpLex/Lexer.fs
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
*)

open FSharpLex.Ast
open Reggie.Ast
open FSharpLex.Parser
open Microsoft.FSharp.Text.Lexing
open System.Text
Expand Down
6 changes: 3 additions & 3 deletions FSharpLex/Parser.fs
Expand Up @@ -25,9 +25,9 @@ limitations under the License.
*)

open FSharpLex.SpecializedCollections
open FSharpLex
open FSharpLex.Ast
open Reggie.SpecializedCollections
open Reggie
open Reggie.Ast

// This type is the type of tokens accepted by the parser
type token =
Expand Down
5 changes: 3 additions & 2 deletions FSharpLex/Program.fs
Expand Up @@ -19,6 +19,7 @@ limitations under the License.
namespace FSharpLex

open System.ComponentModel.Composition
open Reggie.Plugin
open FSharpLex.Plugin


Expand Down Expand Up @@ -131,7 +132,7 @@ type FSharpLex (logger : NLog.Logger) =
None

/// Invokes FSharpLex with the specified options.
member this.Run (inputFile, options) : ExitCode =
member this.Run (inputFile, options : Reggie.CompilationOptions) : ExitCode =
// Contracts
checkNonNull "inputFile" inputFile
if System.String.IsNullOrWhiteSpace inputFile then
Expand All @@ -149,7 +150,7 @@ type FSharpLex (logger : NLog.Logger) =
// Compile the parsed specification.
let compiledSpecification =
logger.Trace "Start: Compiling lexer specification."
Compile.Compiler.lexerSpec lexerSpec options
Reggie.Compile.Compiler.lexerSpec lexerSpec options
logger.Trace "End: Compiling lexer specification."

// Check whether the specification was compiled successfully or not.
Expand Down
2 changes: 1 addition & 1 deletion Reggie.Tests/Collections.fs
Expand Up @@ -18,7 +18,7 @@ limitations under the License.

namespace Tests.Reggie.SpecializedCollections

open FSharpLex.SpecializedCollections
open Reggie.SpecializedCollections
open NUnit.Framework
open FsUnit
open FsCheck
Expand Down
4 changes: 2 additions & 2 deletions Reggie.Tests/Regex.fs
Expand Up @@ -18,8 +18,8 @@ limitations under the License.

namespace Tests.Reggie

open FSharpLex
open FSharpLex.SpecializedCollections
open Reggie
open Reggie.SpecializedCollections
open NUnit.Framework
open FsCheck

Expand Down
2 changes: 1 addition & 1 deletion Reggie.Tests/TestSetup.fs
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
namespace Tests.Reggie

open System.Threading
open FSharpLex.SpecializedCollections
open Reggie.SpecializedCollections
open NUnit.Framework
open FsUnit
open FsCheck
Expand Down
4 changes: 2 additions & 2 deletions Reggie/Ast.fs
Expand Up @@ -17,11 +17,11 @@ limitations under the License.
*)

//
module FSharpLex.Ast
module Reggie.Ast

open System.Globalization
open LanguagePrimitives
open FSharpLex.SpecializedCollections
open Reggie.SpecializedCollections

(* TODO : Add annotations for position information (i.e., position in the lexer
definition file) to:
Expand Down
4 changes: 2 additions & 2 deletions Reggie/Caching.fs
Expand Up @@ -16,9 +16,9 @@ limitations under the License.
*)

namespace FSharpLex
namespace Reggie

open FSharpLex.SpecializedCollections
open Reggie.SpecializedCollections


/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Reggie/Collections.fs
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
*)

namespace FSharpLex.SpecializedCollections
namespace Reggie.SpecializedCollections

open System
open System.Collections.Generic
Expand Down
10 changes: 5 additions & 5 deletions Reggie/Compile.fs
Expand Up @@ -16,16 +16,16 @@ limitations under the License.
*)

namespace FSharpLex.Compile
namespace Reggie.Compile

open System.Diagnostics
open LanguagePrimitives
open ExtCore.Control
open ExtCore.Control.Cps
open FSharpLex
open FSharpLex.SpecializedCollections
open FSharpLex.Graph
open FSharpLex.Ast
open Reggie
open Reggie.SpecializedCollections
open Reggie.Graph
open Reggie.Ast


/// DFA compilation state.
Expand Down
4 changes: 2 additions & 2 deletions Reggie/DerivativeClass.fs
Expand Up @@ -16,12 +16,12 @@ limitations under the License.
*)

namespace FSharpLex
namespace Reggie

open ExtCore.Control.Cps
open ExtCore.Control.Collections
open ExtCore.Control.Collections.Cps
open FSharpLex.SpecializedCollections
open Reggie.SpecializedCollections

(* Turn off warning about uppercase variable identifiers;
some variables in the code below are named using the
Expand Down
4 changes: 2 additions & 2 deletions Reggie/Graph.fs
Expand Up @@ -16,11 +16,11 @@ limitations under the License.
*)

namespace FSharpLex.Graph
namespace Reggie.Graph

open System.Diagnostics
open LanguagePrimitives
open FSharpLex.SpecializedCollections
open Reggie.SpecializedCollections


/// DFA state.
Expand Down
2 changes: 1 addition & 1 deletion Reggie/Options.fs
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*)

namespace FSharpLex
namespace Reggie

(* TODO : Once we support strongly-typed custom metadata from the backends,
these types should be moved into their respective backends since they
Expand Down
6 changes: 3 additions & 3 deletions Reggie/Plugin.fs
Expand Up @@ -16,10 +16,10 @@ limitations under the License.
*)

namespace FSharpLex.Plugin
namespace Reggie.Plugin

open FSharpLex
open FSharpLex.Compile
open Reggie
open Reggie.Compile

(* TODO : Determine how the user will select the backend they want to use,
and also how we can allow backend-specific options to be specified. *)
Expand Down
4 changes: 2 additions & 2 deletions Reggie/Regex.fs
Expand Up @@ -16,11 +16,11 @@ limitations under the License.
*)

namespace FSharpLex
namespace Reggie

open System.Diagnostics
open ExtCore.Control.Cps
open FSharpLex.SpecializedCollections
open Reggie.SpecializedCollections

(* Turn off warning about uppercase variable identifiers; some variables
in the code below are are named using the F# backtick syntax so they
Expand Down
2 changes: 1 addition & 1 deletion Reggie/RegularVector.fs
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*)

namespace FSharpLex
namespace Reggie

open ExtCore.Control
open ExtCore.Control.Collections
Expand Down
4 changes: 2 additions & 2 deletions Reggie/Unicode.fs
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*)

namespace FSharpLex
namespace Reggie


/// Maps Unicode categories to sets of characters they contain.
Expand All @@ -25,7 +25,7 @@ module UnicodeCharSet =
open System
open System.Collections.Generic
open System.Globalization
open FSharpLex.SpecializedCollections
open Reggie.SpecializedCollections

/// Maps each UnicodeCategory to the set of characters in the category.
let byCategory =
Expand Down

0 comments on commit 1ad9660

Please sign in to comment.