aoisupersix / bve5_parsing Goto Github PK
View Code? Open in Web Editor NEW.NET Parsing Library for BveTrainsim 5.
License: MIT License
.NET Parsing Library for BveTrainsim 5.
License: MIT License
ParseTreeNodeの型を判別する方法は、現在各ノードの名前で判別していたが、名前を変更した際の保守性を考慮してtypeof、もしくはGetType()による判別方法に変更する。
現在は構文名や引数名がハードコードになってる
一番気になっていた部分なので早めに修正する
構文名をEnumにするか、構文ごとにクラスを定義するか
IList、Dictionaryをpublicで使うのは良くないらしいので修正する
便利そうだけどよく分からないのでとりあえず起票だけしておく。
恐らくScriptExceptionのstackTraceがnullだからなので、stackTraceの修正?
ASTノードでTrack.Cant.InterpolateとTrack.Cant.Setgaugeを継承しているのが原因。本来存在しないはずのSubElementNameが親クラスで存在するので結果がおかしくなる。
OUTER_CHAR定義は不要のため。
現在マップ要素と関数しかないので、構文の種類が特定しづらい。
関数名にドットが入る関数(Track[].X.Interpolateみたいな)はSubElement:XとFunction:Interpolateに分解する
Includeディレクティブは、その構文位置に指定されたマップ構文ファイル(ヘッダを除く)を挿入する機能らしい。
つまり、Includeディレクティブの動作としては、
これを実装するためには、
デフォルトでは2のBve5_Parsing内で置き換えを行って、オプションとして置き換えを行わずにパース可能にする
Scrapboxの草案を参考に画像を交えつつドキュメントを作る。
パースごとにVariableStoreのインスタンスを作る方が正しい気がする。
ついでにVariableStoreをパース間で引き継げるようにする。
非推奨な構文にはDeprecated属性が付与されているのでそれを使って警告を出す
#82 をマージしたらテストが走らなくなってしまったので修正する
以下エラー:
Starting test execution, please wait...
Unable to find /home/travis/build/aoisupersix/Bve5_Parsing/Bve5_ParsingTests/bin/Debug/netcoreapp2.0/testhost.dll. Please publish your test project and retry.
Test run in progress.Test Run Aborted.
デバッグでテストを動かしたときに何故か例外が発生しなくて調べてみたら、例外が全て握りつぶされていたので修正する。
どうやら本家ソフトは
今まで面倒で作っていなかったので
b5gのbracesが原因。0.0.3で解決させたと思うのでパッケージを更新する
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | tslint |
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
xunit
, xunit.runner.visualstudio
)These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
gen-old/package.json
fs 0.0.2
linq ^3.1.1
mustache ^4.0.0
strip-bom ^4.0.0
gen/package.json
b5g 0.0.3
fs 0.0.2
typescript ^3.5.3
@types/node 12.12.28
ts-node 8.6.2
tslint 5.20.1
tslint-config-airbnb 5.11.2
tsutils 3.17.1
Bve5_Parsing/Bve5_Parsing.csproj
System.Text.Encoding.CodePages 4.5.1
System.Dynamic.Runtime 4.3.0
Microsoft.CSharp 4.5.0
ReadJEnc 1.3.1.2
Antlr4.Runtime 4.6.6
Antlr4 4.6.6
Bve5_ParsingDoc/Bve5_ParsingDoc.csproj
docfx.console 2.49.0
Bve5_ParsingTests/Bve5_ParsingTests.csproj
dotnet-xunit 2.3.1
xunit.runner.visualstudio 2.4.1
xunit 2.4.1
Microsoft.NET.Test.Sdk 16.5.0
nullableExprはnullが入力された場合0を返すが、一部引数がnullの場合は特定の意味をもつ構文が存在する。(ex.Interpolateなど)
現在ステートメントはSyntax1~3に分けて解析を行っているが、一つに統一できそうなので統一させる。
もっとわかりやすいドキュメントにする。
適当な文字列でテストしたい
現在GrammarTest.csでやっているコンソールによるパーサの動作確認を別プロジェクトで行いたい。
とりあえずTODOということで
MapGrammarのパース処理に関する例外処理やエラーメッセージの追加。
取り敢えず現状の問題点↓
他の用途でも活用できそうなのでもっと真面目に実装する。
npmでパッケージを公開したのでそっちを使うように改修する。
MapGrammarと同様の機能を実装する。
構文解析の結果、構文が正しくない場合はScriptExceptionを返すが、現時点では例外の中にファイル名が含まれていないので、どのファイルの例外か判別できない。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.