Skip to content

Commit a3eee1e

Browse files
committed
Working on the markdown to html parser
1 parent 4e33f83 commit a3eee1e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1264
-609
lines changed

Parakeet.Cst/CSharpGrammarCst.cs

+287-144
Large diffs are not rendered by default.

Parakeet.Cst/CSharpGrammarCstFactory.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
// DO NOT EDIT: Autogenerated file created on 2024-03-02 9:43:36 PM.
1+
// DO NOT EDIT: Autogenerated file created on 2024-03-03 10:34:02 PM.
22
using System;
33
using System.Linq;
44
using System.Collections.Generic;
55
using Ara3D.Parakeet.Grammars;
66

77
namespace Ara3D.Parakeet.Cst.CSharpGrammarNameSpace
88
{
9-
public class CstNodeFactory
9+
public class CstNodeFactory : INodeFactory
1010
{
11-
public static readonly CSharpGrammar Grammar = new CSharpGrammar();
11+
public static CSharpGrammar StaticGrammar = CSharpGrammar.Instance;
12+
public IGrammar Grammar { get; } = StaticGrammar;
1213
public Dictionary<CstNode, ParserTreeNode> Lookup { get;} = new Dictionary<CstNode, ParserTreeNode>();
1314
public CstNode Create(ParserTreeNode node)
1415
{

Parakeet.Cst/CombinatorCalculusGrammarCst.cs

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,49 @@
1-
// DO NOT EDIT: Autogenerated file created on 2024-03-02 9:43:35 PM.
1+
// DO NOT EDIT: Autogenerated file created on 2024-03-03 10:34:02 PM.
22
using System;
33
using System.Linq;
44

55
namespace Ara3D.Parakeet.Cst.CombinatorCalculusGrammarNameSpace
66
{
77
/// <summary>
8+
/// Rule = Application ::= ((Term+Term)+(Spaces)?)
89
/// Nodes = (Term+Term)
910
/// </summary>
1011
public class CstApplication : CstNodeSequence
1112
{
12-
public static Rule Rule = CstNodeFactory.Grammar.Application;
13+
public static Rule Rule = CstNodeFactory.StaticGrammar.Application;
1314
public CstApplication(params CstNode[] children) : base(children) { }
1415
public CstNodeFilter<CstTerm> Term => new CstNodeFilter<CstTerm> (Children);
1516
}
1617

1718
/// <summary>
19+
/// Rule = Combinator ::= (Letter+(Spaces)?)
1820
/// Nodes =
1921
/// </summary>
2022
public class CstCombinator : CstNodeLeaf
2123
{
22-
public static Rule Rule = CstNodeFactory.Grammar.Combinator;
24+
public static Rule Rule = CstNodeFactory.StaticGrammar.Combinator;
2325
public CstCombinator(string text) : base(text) { }
2426
// No children
2527
}
2628

2729
/// <summary>
30+
/// Rule = Identifier ::= ((IdentifierFirstChar+(IdentifierChar)*)+(Spaces)?)
2831
/// Nodes =
2932
/// </summary>
3033
public class CstIdentifier : CstNodeLeaf
3134
{
32-
public static Rule Rule = CstNodeFactory.Grammar.Identifier;
35+
public static Rule Rule = CstNodeFactory.StaticGrammar.Identifier;
3336
public CstIdentifier(string text) : base(text) { }
3437
// No children
3538
}
3639

3740
/// <summary>
41+
/// Rule = Term ::= (('('+(Spaces)?+_UNKNOWN_+(Term|Application|Combinator)+(Spaces)?+')'+(Spaces)?)+(Spaces)?)
3842
/// Nodes = (Term|Application|Combinator)
3943
/// </summary>
4044
public class CstTerm : CstNodeChoice
4145
{
42-
public static Rule Rule = CstNodeFactory.Grammar.Term;
46+
public static Rule Rule = CstNodeFactory.StaticGrammar.Term;
4347
public CstTerm(params CstNode[] children) : base(children) { }
4448
public CstNodeFilter<CstTerm> Term => new CstNodeFilter<CstTerm> (Children);
4549
public CstNodeFilter<CstApplication> Application => new CstNodeFilter<CstApplication> (Children);

Parakeet.Cst/CombinatorCalculusGrammarCstFactory.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
// DO NOT EDIT: Autogenerated file created on 2024-03-02 9:43:35 PM.
1+
// DO NOT EDIT: Autogenerated file created on 2024-03-03 10:34:02 PM.
22
using System;
33
using System.Linq;
44
using System.Collections.Generic;
55
using Ara3D.Parakeet.Grammars;
66

77
namespace Ara3D.Parakeet.Cst.CombinatorCalculusGrammarNameSpace
88
{
9-
public class CstNodeFactory
9+
public class CstNodeFactory : INodeFactory
1010
{
11-
public static readonly CombinatorCalculusGrammar Grammar = new CombinatorCalculusGrammar();
11+
public static CombinatorCalculusGrammar StaticGrammar = CombinatorCalculusGrammar.Instance;
12+
public IGrammar Grammar { get; } = StaticGrammar;
1213
public Dictionary<CstNode, ParserTreeNode> Lookup { get;} = new Dictionary<CstNode, ParserTreeNode>();
1314
public CstNode Create(ParserTreeNode node)
1415
{

0 commit comments

Comments
 (0)