-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
submatch対応 #8 #33
submatch対応 #8 #33
Conversation
(seqenceじゃない場合に)確認ミスでまだできてませんでした。。。。 |
|
確かにそうですね。。。ありがとうございます! |
差分を見るなら https://github.com/n4o847/seccamp-redos/compare/submatch とかですかね プルリクがこんなんなってることの解消法は、わからず…… |
ぽちぽちいじってたらいい感じになりました |
masterとの差分がうまく表示されないことを防ぐために, 自分の編集ブランチをpushする前に, masterブランチで 根本君の件で気になって調べたところ, プルリクのFile Changedがマージベースとの差分を表示しているらしくて, それでマージベースを調べたら, 最新のmasterのコミット番号 |
なるほど、ありがたいです。 |
偽判定残り
|
これまでに行っていた方法は間違っていたので大幅に変更し、 |
src/enfa.ts
Outdated
if ( | ||
this.pattern.child.type === 'Capture' || | ||
this.pattern.child.type === 'Group' | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NamedCapture
の場合が抜けている気がします
まあそんな正規表現あんまり無いだろうということで放っといてもいい気もします |
細かい所まで見ていただきありがたいです。 |
sequenceの処理順を少し変えたら、 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
レビューが遅くなってしまい申し訳ないです!
先程述べてくださった/^$/
は、childがSequenceであり286行目のelseを通ることとViz表示がうまくいっていることから正しく判定されていると思います!
次に^$が端にないときなどのbuildChild内で投げられた例外をちゃんと処理していなかった(これは自分の責任)ので何かしら例外処理いいの考えたいですね。
src/enfa.ts
Outdated
) { | ||
// 遷移を削除 | ||
this.transitions = this.transitions.filter( | ||
([s, n, d]) => s !== source || n !== node || d !== dest, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
([s, n, d]) => s !== source || n !== node || d !== dest, | |
([s, n, d]) => !(s === source && n === node && d === dest), |
もしよければここも変えてほしいです
src/enfa.ts
Outdated
) { | ||
// 元の遷移を削除 | ||
this.transitions = this.transitions.filter( | ||
([s, n, d]) => s !== source || n !== node || d !== dest, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
([s, n, d]) => s !== source || n !== node || d !== dest, | |
([s, n, d]) => !(s === source && n === node && d === dest), |
これ初期状態からpatChildへの遷移を消すという意味だと思うのですが意図が伝わりやすいようにこっちの方が良さそうです(完全に僕の好みですが)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
確かに、そのほうが可読性が高いと思いました。ありがとうございます
No description provided.