Results 1 to 2 of 2
  1. #1
    chmaykil is offline Member
    Join Date
    Jun 2014
    Posts
    2
    Rep Power
    0

    Default Javacc Token in grammar file

    I have something like that ( USERUNITS 0.001; PHYSUNITS 9.999999999999999E-10; ) and I'm developping a parser with Javacc so How can I define a FLOAT_POINT in javacc (.jj token) ?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,651
    Blog Entries
    7
    Rep Power
    21

    Default Re: Javacc Token in grammar file

    You have to define a rule for the lexer by that name (scanning floating point numbers is a job for the lexical analyzer; not the parser). Also, read the manual for JavaCC.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. javacc : Retrieve the grammar file (.jj)
    By chmaykil in forum Advanced Java
    Replies: 1
    Last Post: 06-03-2014, 11:50 PM
  2. Replies: 2
    Last Post: 05-17-2014, 08:37 PM
  3. BNF Grammar and reading from a txt file
    By mr_zebes in forum New To Java
    Replies: 2
    Last Post: 03-21-2014, 07:16 AM
  4. Replies: 0
    Last Post: 12-09-2011, 10:28 PM
  5. Replies: 2
    Last Post: 11-21-2011, 11:09 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •