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

Implement Absent Operator #82

Closed
k-takata opened this Issue Dec 14, 2016 · 5 comments

Comments

Projects
None yet
1 participant
@k-takata
Owner

k-takata commented Dec 14, 2016

Slide and paper by Akira Tanaka (@akr) (both Japanese):

TODO:

  • Syntax:
    Maybe the form of (?...) should be used. For example (?~...)?
  • Implementation:
    Is it easy?
@k-takata

This comment has been minimized.

Show comment
Hide comment
@k-takata

k-takata Dec 15, 2016

Owner

Akira's paper says that look-ahead assertion doesn't have theoretical backgrounds. However @sinya8282 says that look-ahead assertion is a regular expression (in context of formal language theory), and it can be proved by using boolean automaton.
Then absent operator can be a syntax sugar of (?:(?!expr)(?m:.))*?

Owner

k-takata commented Dec 15, 2016

Akira's paper says that look-ahead assertion doesn't have theoretical backgrounds. However @sinya8282 says that look-ahead assertion is a regular expression (in context of formal language theory), and it can be proved by using boolean automaton.
Then absent operator can be a syntax sugar of (?:(?!expr)(?m:.))*?

@k-takata

This comment has been minimized.

Show comment
Hide comment
@k-takata

k-takata Dec 15, 2016

Owner

It seems that (?~expr) is different from (?:(?!expr).)*.
\A(?~abc)c should match abc (because (?~abc) matches ab), but \A(?:(?!abc).)*c doesn't match.

https://twitter.com/nalsh/status/809375869626150912

Owner

k-takata commented Dec 15, 2016

It seems that (?~expr) is different from (?:(?!expr).)*.
\A(?~abc)c should match abc (because (?~abc) matches ab), but \A(?:(?!abc).)*c doesn't match.

https://twitter.com/nalsh/status/809375869626150912

k-takata added a commit that referenced this issue Dec 23, 2016

Implement absent operator (Issue #82)
(?~subexp) matches any string which doesn't have subexp as its suffix.

This is based on Tanaka Akira's paper and slide:
* https://staff.aist.go.jp/tanaka-akira/pub/prosym49-akr-paper.pdf
* https://staff.aist.go.jp/tanaka-akira/pub/prosym49-akr-presen.pdf

k-takata added a commit that referenced this issue Dec 23, 2016

k-takata added a commit that referenced this issue Dec 23, 2016

@k-takata k-takata added the todo label Dec 23, 2016

@k-takata

This comment has been minimized.

Show comment
Hide comment
@k-takata

k-takata Dec 23, 2016

Owner

topic/absent-operator branch was merged into the master branch.
Maybe more tests are needed, but closing for now.

Owner

k-takata commented Dec 23, 2016

topic/absent-operator branch was merged into the master branch.
Maybe more tests are needed, but closing for now.

@k-takata k-takata closed this Dec 23, 2016

@k-takata

This comment has been minimized.

Show comment
Hide comment
@k-takata

k-takata Dec 25, 2016

Owner

However @sinya8282 says that look-ahead assertion is a regular expression

This is discussed in a paper by Akimasa MORIHATA:

Owner

k-takata commented Dec 25, 2016

However @sinya8282 says that look-ahead assertion is a regular expression

This is discussed in a paper by Akimasa MORIHATA:

@k-takata

This comment has been minimized.

Show comment
Hide comment

hsbt pushed a commit to ruby/ruby that referenced this issue Feb 11, 2017

Merge Onigmo 6.1.1
* Support absent operator k-takata/Onigmo#82
* https://github.com/k-takata/Onigmo/blob/Onigmo-6.1.1/HISTORY

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

hsbt pushed a commit to ruby/ruby that referenced this issue Mar 13, 2017

merge revision(s) 57603: [Backport #12997]
	Merge Onigmo 6.1.1

	* Support absent operator k-takata/Onigmo#82
	* https://github.com/k-takata/Onigmo/blob/Onigmo-6.1.1/HISTORY

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

@znz znz referenced this issue Mar 22, 2017

Closed

Absence Operator #395

@eregon eregon referenced this issue Oct 6, 2017

Open

Write specs for new Ruby 2.4 features and changes #473

65 of 75 tasks complete

@headius headius referenced this issue Dec 1, 2017

Closed

Ruby 2.5 Support #4876

64 of 75 tasks complete

@eregon eregon referenced this issue Dec 15, 2017

Open

Write specs for new Ruby 2.5 features and changes #565

47 of 61 tasks complete

@headius headius referenced this issue Mar 27, 2018

Open

Unimplemented Ruby 2.5 Features #5118

1 of 12 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment