1 / 14

Examples of using Grapacc

Examples of using Grapacc. Demo 1. Given a text file, use Scanner object to read tokens in that text file: Using following objects: File, Scanner And control: while(). Developer filling phase. Code Recommendation phase. Code completion phases.

bette
Download Presentation

Examples of using Grapacc

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Examples of using Grapacc

  2. Demo 1 • Given a text file, use Scanner object to read tokens in that text file: Using following objects: File, Scanner And control: while()

  3. Developer filling phase

  4. Code Recommendation phase

  5. Code completion phases • # tokens filled by developer: (File, f, new, File, Scanner, sc, while) = 7 • # tokens filled by Grapacc: (new, Scanner, f, sc,hasNext, sc,Next) = 6

  6. Demo 2 • Given an ArrayList, read all of its element using iterator: Using following objects: ArrayList, Iterator And control: for()

  7. Developer filling phase

  8. Code Recommendation phase

  9. Code completion phases • # tokens filled by developer: (ArrayList, arlist, for) =3 • # tokens filled by Grapacc: (new, ArrayList, Iterator, it, arlist, iterator, for, it, hasNext, it, Next) = 11

  10. Demo 3 • Given an ArrayList, check if its size >0: Using following objects: ArrayList And control: if()

  11. Developer filling phase

  12. Code Recommendation phase

  13. Code completion phases • # tokens filled by developer: (ArrayList, arlist, if) =3 • # tokens filled by Grapacc: (new, ArrayList, arlist, size) = 4

  14. Table of counted tokens

More Related