コード例 #1
0
 public LevelParser(int level)
     : base("DataType",
            Line.Multiple(
                Line.And(
                    Line.StartsWithMarker(Prefix.Marker(level)),
                    Line.Contains("PIC "),
                    Line.DoesNotContain(" REDEFINES "),
                    Line.DoesNotContain(" OCCURS ")
                    ),
                Line.Optional(
                    Line.Repeat(Line.StartsWith(Prefix.Empty))
                    )
                ),
            Data.OnLine(0,
                        Data
                        .TruncateAtColumn(59)
                        .IgnoreBefore(Prefix.Marker(level)).ExcludeMarker()
                        .IgnoreAfter(".").ExcludeMarker()
                        .RemoveSpaces()
                        .Trim())
            .TruncateAt(59)
            .IgnoreAfter(".").ExcludeMarker()
            .Trim(),
            Comment
            .IgnoreBefore(59)
            .RemoveSpaces()
            .Trim(),
            new IImpliedModelParser[]
 {
 },
            DataTypeModel.Factory)
 {
 }
コード例 #2
0
 public LevelParser(int level)
     : base("Occurs",
            Line.Multiple(
                Line.And(
                    Line.StartsWithMarker(Prefix.Marker(level)),
                    Line.Contains("OCCURS ")
                    ),
                Line.Optional(
                    Line.Repeat(Line.StartsWith(Prefix.Empty))
                    )
                ),
            Data.OnLine(0,
                        Data
                        .TruncateAtColumn(59)
                        .IgnoreBefore(Prefix.Marker(level)).ExcludeMarker()
                        .IgnoreAfter(".").ExcludeMarker()
                        .RemoveSpaces()
                        .Trim())
            .TruncateAt(59)
            .IgnoreAfter(".").ExcludeMarker()
            .Trim(),
            Comment
            .IgnoreBefore(59)
            .RemoveSpaces()
            .Trim(),
            new[]
 {
     DataTypeParser.ImpliedParser(OccursModel.Factory)
 },
            OccursModel.Factory
            )
 {
 }
コード例 #3
0
 public LevelParser(int level)
     : base("EnumValue",
            Line.Multiple(
                Line.StartsWithMarker(Prefix.Marker(88)),
                Line.Optional(
                    Line.Repeat(Line.StartsWith(Prefix.Empty))
                    )
                ),
            Data.OnLine(0,
                        Data
                        .TruncateAtColumn(60)
                        .IgnoreBefore(Prefix.Marker(88)).ExcludeMarker()
                        .IgnoreAfter(".").ExcludeMarker()
                        .RemoveSpaces()
                        .Trim())
            .TruncateAt(60)
            .IgnoreAfter(".").ExcludeMarker()
            .Trim(),
            Comment
            .IgnoreBefore(60)
            .Trim(),
            new IImpliedModelParser[]
 {
 },
            EnumValueModel.Factory
            )
 {
 }
コード例 #4
0
 public ClassParser()
     : base("Class",
            Line
            .StartsWithMarker(Prefix.Marker(1)),
            Data
            .IgnoreBefore(Prefix.Marker(1)).ExcludeMarker()
            .IgnoreAfter(".").ExcludeMarker()
            .Trim(),
            Comment
            .IgnoreBefore(".").ExcludeMarker(),
            new IImpliedModelParser[]
 {
 },
            ClassModel.Factory
            )
 {
 }