Bve5_Parsing 1.0.1

dotnet add package Bve5_Parsing --version 1.0.1
NuGet\Install-Package Bve5_Parsing -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bve5_Parsing" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bve5_Parsing --version 1.0.1
#r "nuget: Bve5_Parsing, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Bve5_Parsing as a Cake Addin
#addin nuget:?package=Bve5_Parsing&version=1.0.1

// Install Bve5_Parsing as a Cake Tool
#tool nuget:?package=Bve5_Parsing&version=1.0.1

Build Status All Contributors NuGet version MIT License



BveTrainSim5構文の.NETパーサライブラリです。 入力された文字列やファイルを解析し、プログラム上で利用しやすい形式に変換します。 現在マップファイルとシナリオファイル構文に対応しています。

Supported Syntaxes

  • Scenario File
    • Bve5の全構文に対応
  • Map File
    • マップファイルのバージョン1.00から2.02に対応。
    • 数式や変数、Includeディレクティブにも対応しています。



  • .Net Standard 2.0 or .Net framework 4.0



  • コマンドラインからインストールする場合

    nuget install Bve5_Parsing
  • VisualStudioからインストールする場合

    1. ツール > Nugetパッケージマネージャ > ソリューションのNugetパッケージの管理をクリック
    2. 参照タブでBve5_Parsingを検索
    3. インストールをクリック

Usage for C#


using Bve5_Parsing.MapGrammar;
using Bve5_Parsing.MapGrammar.EvaluateData;
using System.Linq;

    string input; //String to be analyzed
    MapGrammarParser parser = new MapGrammarParser();

    // 文字列をマップ構文としてパースする
    MapData mapData = parser.Parse(input);
    // マップファイルへのファイルパスを指定してパースする
    MapData mapData2 = parser.ParseFromFile(@"PATH/TO/MAP/FILE");
    // Include構文の参照先を再帰的にパースする
    MapData mapDataWithInclude = parser.ParseFromFile(@"PATH/TO/MAP/FILE", MapGrammarParserOption.ParseIncludeSyntaxRecursively)
    // AST(抽象構文木)にパースする
    MapData ast = parser.ParseToAst(input, @"PATH/TO/FILE/PATH");

    // パースエラーの取得
    if (parser.ParseErrors.Any()) {
      // error handling

    // 旧形式でステートメントのデータを取得する場合(通常は必要ありません)
    var syntaxData = mapData.Statements.Select(state => state.ToSyntaxData());

    mapData.Version //マップ構文のバージョン情報
    mapData.Encoding // マップ構文のエンコーディング指定
    foreach(var statement in mapData.Statements) {
      /* 各構文情報 */
      statement.Distance; //構文の距離程
      statement.FunctionName; //構文の関数名



Used Librarys

Bve5_Parsing is using the following library.


The BSD License (3-clause BSD License)

Copyright (c) 2012 Terence Parr and Sam Harwell


The MIT License (MIT)

Copyright (c) 2017 hnx8


The MIT License (MIT)

Copyright(c) 2017-2019 aoisupersix




Thanks goes to these wonderful people (emoji key):

<table><tr><td align="center"><a href=""><img src="" width="100px;" alt="Aoi Tanaka"/><br /><sub><b>Aoi Tanaka</b></sub></a><br /><a href="" title="Code">💻</a></td><td align="center"><a href=""><img src="" width="100px;" alt="s520"/><br /><sub><b>s520</b></sub></a><br /><a href="" title="Code">💻</a></td></tr></table>

This project follows the all-contributors specification. Contributions of any kind welcome!

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 757 6/9/2019
1.0.0 669 4/27/2019
0.8.1 636 4/13/2019
0.8.0 626 4/10/2019
0.7.0 598 2/25/2019
0.6.2 741 10/23/2018
0.6.1 726 10/23/2018
0.6.0 720 10/22/2018