Skip to content

lexer raise for literals followed by alphanum#155

Closed
hhugo wants to merge 2 commits intoocaml:trunkfrom
hhugo:lexer_n_literal
Closed

lexer raise for literals followed by alphanum#155
hhugo wants to merge 2 commits intoocaml:trunkfrom
hhugo:lexer_n_literal

Conversation

Copy link
Member

Choose a reason for hiding this comment

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

Literal_malformed does not sound like proper english to me. It should be Malformed_literal -- or maybe the more neutral Invalid_literal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True. This was only to get a common prefix with Literal_overflow.
Invalid_literal seems better anyway.

@hhugo hhugo force-pushed the lexer_n_literal branch from d813e9d to be8b65a Compare March 20, 2015 22:54
Copy link
Member

Choose a reason for hiding this comment

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

What's the point of the star here? You want to raise as soon as you see one identchar, and you don't want to raise if there are none.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The star should probably be a plus.
The error Invalid literal 0o18 seems weird when trying to lex 0o1823

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, a plus would be more robust.

@hhugo hhugo closed this Apr 9, 2015
@hhugo hhugo reopened this Apr 9, 2015
@gasche
Copy link
Member

gasche commented Apr 12, 2015

Merged in trunk. Thanks!

@damiendoligez
Copy link
Member

FTR, this change broke (at least) the following OPAM packages:

  • archimedes 0.4.17
  • caml2html 1.4.3
  • cubicle 1.0.2

@gasche
Copy link
Member

gasche commented Mar 4, 2016

Would you have the code snippets that break? Just curious.

@damiendoligez
Copy link
Member

For archimedes:

               let cosa = cos angle /.2.
               and sina = sin angle  /.2.in

For cubicle:

  let max_id_vars = !i - 1in

For caml2html, it's in a file designed to torture-test the parser, see mjambon/caml2html#3

mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jun 10, 2020
* Use bytecode version for Lazy.force inlining

* Extend lazy_invalid test
lthls added a commit to lthls/ocaml that referenced this pull request Sep 23, 2020
* Use bytecode version for Lazy.force inlining

* Extend lazy_invalid test
lthls added a commit to lthls/ocaml that referenced this pull request Sep 23, 2020
* Use bytecode version for Lazy.force inlining

* Extend lazy_invalid test
lthls added a commit to lthls/ocaml that referenced this pull request Sep 24, 2020
* Use bytecode version for Lazy.force inlining

* Extend lazy_invalid test
chambart pushed a commit to chambart/ocaml-1 that referenced this pull request Jan 4, 2022
…bda...) and source code. (ocaml#155)

Add printers able to track mappings between source code and intermediate representations
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
* add rescript:format task for manual formatting and add minimal vscode extension settings
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
* Add very simple tab-completion to the toplevel

This is based on uTop's implementation, with all of the utf-8 parts
stripped out. Unfortunately compiling camomile with js_of_ocaml was
causing an error early during initialisation.

I've kept the uTop modules in the same structure they were originally
so it's easy to reinstate if camomile gets fixed or if we find a
suitable replacement.

The UI/UX/DX could do with some love!

* Add toplevel-completion to CHANGES.md

* Add cppo preprocessed files to .ocamlformat-ignore
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