Skip to content

Disallow control characters in literals #143

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

Merged
merged 2 commits into from
Oct 20, 2015
Merged

Disallow control characters in literals #143

merged 2 commits into from
Oct 20, 2015

Conversation

rossberg
Copy link
Member

Addresses #142.

@rossberg rossberg changed the title Disallow control cheracters in literals Disallow control characters in literals Oct 16, 2015
@@ -88,7 +88,7 @@ let letter = ['a'-'z''A'-'Z']
let symbol = ['+''-''*''/''\\''^''~''=''<''>''!''?''@''#''$''%''&''|'':''`''.']
let tick = '\''
let escape = ['n''t''\\''\'''\"']
let character = [^'"''\\''\n'] | '\\'escape | '\\'hexdigit hexdigit
let character = [^'"''\\''\x00'-'\x1f'] | '\\'escape | '\\'hexdigit hexdigit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (an below) should also exclude \x7f, the DEL character.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@sunfishcode
Copy link
Member

sgtm. Is it possible to write a test confirming that control characters are rejected?

@jfbastien
Copy link
Member

For the record, I think we'll want something slightly different as I mention in #142 (comment)

This change shouldn't be blocked on it, though.

@rossberg
Copy link
Member Author

Is it possible to write a test confirming that control characters are rejected?

Difficult. We don't have any infrastructure for testing syntax errors, which could only work outside the script language. Not sure it's worth the effort either.

@rossberg
Copy link
Member Author

Addressed comment, PTAL.

@sunfishcode
Copy link
Member

lgtm

rossberg added a commit that referenced this pull request Oct 20, 2015
Disallow control characters in literals
@rossberg rossberg merged commit 71d796c into master Oct 20, 2015
@rossberg rossberg deleted the text branch October 20, 2015 23:52
Connicpu pushed a commit to Connicpu/wasm-spec that referenced this pull request Jun 7, 2020
Fixes WebAssembly#142. A mismatched `DataCount` is malformed, not a validation error.
ngzhian pushed a commit to ngzhian/spec that referenced this pull request Nov 4, 2021
It's not the same as the proposed specification document.
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
…mbly#143)

* formal spec overview for the 3rd exception handling proposal

This adds a condensed version of the current core formal spec, and some examples of reductions according to this spec.

These files were added to aid in discussions when finalising spec details.
After 260 PR comments and suggestions co-authors are:

Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Heejin Ahn <[email protected]>
Co-authored-by: Ross Tate <[email protected]>
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
This is not the suggestion given in that last review of WebAssembly#143:
https://github.com/WebAssembly/exception-handling/pull/143/files#r759907998

but a potential fix of the issue raised there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants