GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update ANTLR grammar to support Java 1.8 syntax · Issue #3054 · processing/processing

Update ANTLR grammar to support Java 1.8 syntax #3054

New issue
Copy link
New issue
Copy link
Closed
Closed
Update ANTLR grammar to support Java 1.8 syntax#3054
Copy link
Labels
enhancementhelp wantedWe have very little time and would like some helpWe have very little time and would like some help

Description

@benfry
benfry
opened on Jan 22, 2015
Issue body actions

Our current grammar is out of date and doesn't support many newer Java features. See also #3055.

Reacted by Raphael Schweikert

Activity

  1. benfry
    added
    enhancement
    help wantedWe have very little time and would like some helpWe have very little time and would like some help
    on Jan 22, 2015
  2. joelmoniz commented on Mar 23, 2015

    @joelmoniz
    joelmoniz
    on Mar 23, 2015
    Member
    More actions

    @benfry I'd like to help out with this. Could you please let me know which features are missing/out-of-date at present? Here are a few missing ones that I have identified, although I'm not quite sure about how relevant/important they may be:

    1. Multi-catch support
    2. Support for the diamond operator
    3. Underscores in numeric literals (such as int x = 30_000)
    4. Strings in switch
    5. Binary literals
    6. Support for lambda calculus

    Thanks

  3. benfry commented on Mar 24, 2015

    @benfry
    benfry
    on Mar 24, 2015
    ContributorAuthor
    More actions

    Thanks for the interest. This is less about adding the language features one by one than it is finding an existing Java 1.8 grammar for ANTLR and making it work. This would be best handled by fixing #3055 first, and then going after this issue.

  4. miguel-negrao commented on Jul 12, 2016

    @miguel-negrao
    miguel-negrao
    on Jul 12, 2016
    More actions

    Support for lambda calculus

    Lambda calculus is an abstract mathematical entity: "Lambda calculus (also written as λ-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution.". You probably mean lambda expressions.

    Reacted by David Merrick
  5. cansik commented on Nov 26, 2016

    @cansik
    cansik
    on Nov 26, 2016
    More actions

    Is someone working on this issue or on #3055 at the moment? There is an existing grammar for ANTLR: https://github.com/antlr/grammars-v4/blob/master/java8/Java8.g4

    It would be great to be able to write lambda expression.

  6. kevinkyyro commented on Nov 26, 2016

    @kevinkyyro
    kevinkyyro
    on Nov 26, 2016
    More actions

    I'm not actively working on it, but I've looked at it a bit and it seems tricky.

    It looks like the currently used java 5 grammar is not a vanilla; I don't know ANTLR so it's difficult to try to tease out the modifications and then migrate them to ANTLR 4 since I couldn't find migration guides from ANTLR 2 to 3 and 3 to 4 (found one but not the other).

    I wonder if it would make sense to migrate to a code or script-based preprocessor translating from processing syntax to valid java 5, then piping that through ANTLR with the vanilla java 5 grammar. It seems like it would make it easier to drop in the java 8 grammar, ideally without modification. This is based on the assumption that the preprocessor would be relatively simple; most of the modifications seem context-independent -- mainly just globals and type aliases, though type I guess type coercion could need a little more care if type aliasing is not sufficient.

  7. sampottinger commented on Mar 27, 2019

    @sampottinger
    sampottinger
    on Mar 27, 2019
    More actions

    Hey there! Just to keep some threads updated... I revisited #3055, bringing it up to speed with processing's current master and #5753. I have a build of processing working (with a few particular error handlers being migrated) at sampottinger#15. I'll redirect that from my fork to this repo after #5753 is concluded.

  8. sampottinger commented on Apr 9, 2019

    @sampottinger
    sampottinger
    on Apr 9, 2019
    More actions

    Hey there! Just a quick update for those tracking this thread. sampottinger#15 is stable and ready for feedback. I recommend testing using my master at https://github.com/sampottinger/processing. It has all of the PRs that branch off of #5753 merged in.

    Unfortunately #5753 is still under review so there is likely a little runway on my fork but hoping to rejoin mainline soon.

  9. sampottinger
    added 2 commits that reference this issue on Oct 6, 2019

    Move to ANTLR 4 with Java 11 lang features and localization.

    cbfa4b3

    Move to ANTLR 4 with Java 11 lang features and localization. (#5)

    ee299ef
  10. benfry commented on Jan 17, 2020

    @benfry
    benfry
    on Jan 17, 2020
    ContributorAuthor
    More actions

    Resolved in the 4.x series: https://github.com/processing/processing4

  11. benfry
    closed this as completedon Jan 17, 2020
  12. processing
    locked as resolved and limited conversation to collaborators on Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wantedWe have very little time and would like some helpWe have very little time and would like some help

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.