Javacc assistance: adding a block of arbitrary text

Hi all
I'm developing a statechart compiler, which takes in a textual format and generates C. This C is destined for embedded systems. Part of the frontend of the compiler is my parser.
Most of my parser grammer is done, apart from this: allowing parsing of arbitrary text, as per this example:
MyStateA
  entry
    --arbitrary C code here--
}So, parse the state block, which contains an entry block (all good so far). But how do I approach the arbitrary C code section? I dont want to incorporate the entire C grammer into my langauge. I've seen techniques whereby { and } braces are counted somehow, and the skip and token specs change. In this arbitrary code section, I can make the requirement that there must be prefectly paired braces within, thus the last closing one for entry can be determined.
Can someone give me a hand with this?
Thanks
Rich

Thanks
Okay, my compiler / code generator is written in Java. Thus the output of javacc plays very well with the rest of the compiler. It is the output of my compiler that is C.
I currently have something like:
void State()
  (Entry())?
void Entry()
  <ENTRY>
  <LEFTBRACE>
    (nothing here yet)
  <RIGHTBRACE>
}What does one do next? Do I define a token for (.*)? Then do something like x=<THAT_TOKEN> in the middle there? At some point I need to capture the actual code to place into my intermediate representation. None of the capturing parts of the input to the IR is done yet.
void Entry()
  <ENTRY>
  <RANGLEBRACE>
    (something)
  <LANGLEBRACE>
}Cheers
Rich

Similar Messages

  • Ability to block individual premium text messages

    I am receiving spam in the form of premium text messages from 33555.  My only option appears to be blocking receipt of all premium messages, which will not work for me.  I would like the ability to block individual premium text numbers.

    You will need to send a Text message with one of the opt-out keywords below to the code that the message is coming from which you stated (33555). This will stop future billing for the Premium Messaging. However, charges for Premium Messaging may appear on the your bill for up to two full bill cycles after the Premium Messaging block has been added to the account. This is due to timing of the bill cycle and the premium service subscription opt-in date.
    Quit,
    Cancel,
    End,
    Unsubscribe ,
    Stop,
    Stop All
     If opt-out confirmation not received meaning if you did not get a text right back stated the premium message has been stopped , then that's when we will have to go in and add the premium messaging block to stop you from receiving the alert and charge any further. Hope this Helps

  • How do I block calls and texts on a prepaid phone?  Says service unavailble when I try to do it through VZW

    How do I block calls and texts on a prepaid phone?  Says service unavailble when I try to do it through VZW

    bathgate69, sorry for this inconvenience. Which make/model phone do you have?
    For your convenience, you can also reach our Prepaid customer service department at 888-294-6804 for help, as well.
    LasinaH_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • I got the new iPhone5 back in Dec, I hooked it up to my computer for the 1st time this wk.  It deleted all new data added since Dec (notes,contacts,texts,pics, info in apps) and reverted back to all my old data.  How can I retrieve all the lost data??

    I got the new iPhone5 back in Dec, I hooked it up to my computer for the 1st time this wk.  It deleted all new data added since Dec (notes,contacts,texts,pics, info added to apps) and reverted back to all my old data (literally uploaded all of my old texts and 1400 old pics and deleted anything new).  How can I retrieve all the lost data?? Please help!!

    SkyDaughter29 wrote:
    My current situation: I have soooo many texts on my iphone and I haven't deleted many because I need the information contained in them for future reference and for legal purposes.  I would really like to find a means and way to save them other than on the phone itself. I've done searches for various apps yet I'm not finding what I think I would need.  It appears Apple does not sync the texts between the iphone and my MacBook Pro.
    Try the computer apps PhoneView (Mac) or TouchCopy (Mac & PC):
    http://www.ecamm.com/mac/phoneview/
    http://www.wideanglesoftware.com/touchcopy/index.php
    Best of luck.

  • Can numbers be blocked from receiving text messages and calls?

    can phone numbers be blocked from receiving text messages and/or calls on IPhone?

    You have to check with your carrier. I know Verizon you can log in and block calls.
    You can not selectively do this on the phone.

  • Adding custom message in exception list of F110 transaction without adding payment block

    Hi All,
    My requirement is to add custom message in exception list of F110 transaction based on certain fields validation without adding payment block .
    I tried using BTE 1820 where I can add my validation but am not able to add the custom message in exception list.
    Thanks,
    Mihika.

    Hi Raymond,
    Thanks for your reply.
    I did checked the document and tried giving the S and I message in my BTE with trace option checked on Additional log screen.
    But Success and information message doesn't showed in Exception List.
    If I set the Error message the Proposal gets cancelled and I can see my error message in log. (We don't want this option as in this option proposal is not getting created)
    If I set the Payment block I can see that logged in exception list. But we don't want to set the payment block but the message should appear in exception list.
    I added the message using simple message statement. Will you please advice if any other way to add the message other than using the MESSAFE statement.
    Thanks,
    Mihika.

  • CS4 Custom Metadata Panels : "Generic" : Ability to display block of predefined text in panels ?

    I am in the process of converting a number of CS3 custom metadata panels to the Adobe CS4 Suite using the "Generic" panel included with the current SDK. After reading though the documentation on the "Generic" panel, it seems that there is no easy way to define a block of predefined, non-editable text (a legal disclaimer for example) within a CS4 "Generic" panel.
    Note that this is text that is not actually embedded into an image or editable, but rather a block of predefined text that simply displays within the panel itself.
    When creating CS3 custom panels, a predefined text block was easily displayed using a combination of the "width:", "height:" and "static_text:" parameters.
    Has anyone been able to replicate this using the CS4 "Generic" panel?
    Thanks in advance for your time and effort...

    James,
    Alternative: XMP FileInfo SDK page 40, the attribute description= displays static text as a mouse-over tooltip operation on a single field.
    This applies to custom XMP properties in a custom namespace. The standard in-the-box XMP properties description= cannot be modified via a custom .xml schema definition as far as I can determine. (I tried, and mine were ignored.)
    Regards,
    Carl Rambert

  • Adding a blank slide with text

    In iPhoto I have created a slideshow that works well. However, I would like to seperate some of the slides into groups by adding a blank slide with text, is this posible?
    Wrongray

    Actually you need to do a Print ➙ PDF ➙ Save PDF to iPhoto. That will create a jpg image file of the document and import it into iPhoto where you can use it in the slideshow.
    You can also use a 3rd party image editor that can handle text, or one of the iWork applications if you want a fancy title slide.
    Some Image Editors that support layers and text:
    Photoshop Elements 8 for Mac - $79
    GraphicConverter - $45
    Rainbow Painter - $30
    Acorn - $50
    Pixelmator - $60
    Seashore - Free
    GIMP for Mac - Free
    OT

  • How do I block people from texting me in "iMessage" / "Messages" on the iPad?

    AARRGGGGHHHH!!
    People are "texting" me on my iPad and I can't make it stop. HELP!!
    I can't believe ... I'm absolutely dumb-founded ... that Apple provides no way to block harassing users. This is NOT related to a wireless/cellular carrier, this is on my wifi-only iPad.

    You really have to wonder why the feature of blocking someone is not available.  It would be simple to implement.  Harrassing text messages, imessages, whatever you want to call them give an abuser a way to contact someone who does not want any contact.  This can result in psychological damage, even in some cases suicide.  If I am receiving unwanted messages from someone, I don't see why I can't just hit a button that says block.  The message then can be diverted to a folder, and if I want to unblock them I should be allowed.  There is not one reason I can imagine why I should not have this power.  It's ridiculous and unfortunate that in this age of bullying and stalking, we aren't allowed this modicum of control over our privacy.  So just when you think you have forgotten someone, or someone you love has finally removed an abusive person from their lives and moved on, all that person has to do is suddenly decide to text you day and night so that you cannot do anything but think about them.  Why oh why is there no block messages from this person button as there is in virtually every social networking website?  I am flabbergasted.  And of course if you have a data plan and someone wants to send you spam, they can actually eat into your data usage against your will.  I have to deny my family the ability to send me iMessages by completely disabling it because one nutcase won't leave me alone?  Again, where is our control over our privacy?  I'm frustrated over this issue, and after seeing what happened to Amanda Todd I don't see why it's not mandatory that this feature be added to every instant messaging platform.  "Block User"  I'm completely blown away now that I've researched this issue and I hope other people rally behind a change.  How hard would it be for a 45kb update to iMessage with the ability to block users?  Someday Apple is going to get sued when something terrible happens all because they refused to listen to reason.  We need cotrol of our lives, and especially where teenagers are concerned.  They need to be able to block unwanted attention from people who found a way into their personal lives.  Go to youtube and look up Amanda Todd.  It's tragic and Apple is going to do nothing about it.  Anybody who is living through this sort of nightmare knows how insane it is that we cannot simply hit "block user".  I also am dumbfounded!

  • How do I add multiple text block records from text file?

    The data manager documentation (page 151) for MDM 5.5 SP3 indicates that one or more new text blocks can be added to the Text Blocks object table from files. It is noted that the files must be plain text files.
    I use notepad and create a text file with two lines as follows:
    Test 1
    Test 2
    When I try to add the text blocks following documentation mentioned above, it only adds one record for the Data Group I have chosen and the record contains the entry "Test 1" from the first line in the text file.
    How can I add multiple records to the data group from a file?

    From my testing it appears that you need to have one text file per text block record in Data Manager.
    I wrote VBA macro to so that I could input my text blocks into an Excel spreadsheet and then the macro will take the contents of each cell in a highlighted column and create one text file per cell.
    Then using Data manager, I can select all of the text files at once and it will import them, creating one record per text file.

  • Migration assistant added second user did not merge data: iTunes

    I set up my new mac at the store then came home and connected my OLD iMac to the new via Firewire. I used Migration Assistant, and the migration took about 90 minutes. When it was done I had two parallel usernames; my old username with the old desktop look and stuff and the new computer's username I set up with the clerk at the Mac Store. Now I have two separate users on my computer, complete with two separate iTunes. When I look in the finder under Macintosh HD/Users, I see an icon for the new user (the little house) and a folder labeled with the old username but it has a red "negative" circle over it (like a push icon on an iPhone, but with a minus sign in the middle), plus a Shared folder.
    The weird thing is that all the documents and stuff merged, but I have to go to the old user to use iTunes. My old computer did also have 2 users (why? I have no idea) and it brought the iTunes library I did not use in, but not the massive library I do use in. I teach a fitness class and have about 100 unique playlists and ALOT of music on that thing - but the wrong library was brought in. Now I have to switch back to the old user to use iTunes and that just seems silly. I have tried 'add to library" to try to bring the stuff over but it can't see into the other user I guess.
    Any suggestions? It is so frustrating that my whole library is there but I can't access it on the new user after spending all that money.
    Thanks!

    Read here on why a second user was added and how to remedy.
    http://web.me.com/pondini/AppleTips/SetupAsst.html
    Regards,
    Captfred

  • Error when adding image in-line with text

    When using some of my templates I have no problem in putting
    a small graphic (a pdf icon) in-line with text. Yet with others the
    insertion of the same small graphic forces a newline before and
    after the graphic.
    If the text and image is placed in an editable region of the
    template, but not within a table cell all is ok.
    If the text and image is place within a table cell within the
    editable region the problem arises. I am sure there is something I
    have specified incorrectly but cannot discover what it is.
    An example of where it works fine is:
    www.digitalfox.co.uk/parryassociates/products.htm
    An example of where it doesn't work is:
    www.bournemouthlittletheatre.co.uk/membership2.htm
    I am using Dreamweaver 8 within Studio 8 and run under
    Windows XP.
    Can anyone help please?
    Regards
    Roger Sansom

    Hmm -
    <style type="text/css">
    <!--
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    @import url("nav-bar-top/nav-bar-top.css");
    Is this the belt and bracers approach? 8)
    Anyhow, your problem is in the very first line of one of
    those (take your
    pick) -
    TD IMG {
    DISPLAY: block
    That causes images in table cells to behave as a block tag.
    Block tags
    force all adjacent content to the next line.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "RogerLS" <[email protected]> wrote in
    message
    news:[email protected]...
    > When using some of my templates I have no problem in
    putting a small
    > graphic (a
    > pdf icon) in-line with text. Yet with others the
    insertion of the same
    > small
    > graphic forces a newline before and after the graphic.
    >
    > If the text and image is placed in an editable region of
    the template,
    > but
    > not within a table cell all is ok.
    >
    > If the text and image is place within a table cell
    within the editable
    > region
    > the problem arises. I am sure there is something I have
    specified
    > incorrectly
    > but cannot discover what it is.
    >
    > An example of where it works fine is:
    > www.digitalfox.co.uk/parryassociates/products.htm
    >
    > An example of where it doesn't work is:
    > www.bournemouthlittletheatre.co.uk/membership2.htm
    >
    > I am using Dreamweaver 8 within Studio 8 and run under
    Windows XP.
    >
    > Can anyone help please?
    >
    > Regards
    > Roger Sansom
    >
    >
    >

  • Extra space adding during spool data into text file

    I'm using sql developer to query oracle tables. I can export data using GUI of sql developer, but I wish to use spool query to export the data. Using below query, I was able to export the data to specified location, but my final text file consist of additional spaces after each line. These additional spaces between each line is causing an error to upload the text file in different location.
    Did any one face have this issue? Below is my query
    set head off
    SET FEEDBACK OFF
    SET ECHO    OFF
    SET TRIMSPOOL ON
    SET TRIMOUT ON
    spool c:\test.txt
    select cast(memberid||',12'as varchar2(20))
    from abc;
    spool off
    set head on
    set ECHO on
    i'm using trimspool, and trimout, but it is not removing any blank spaces.

    Sorry, I changed my export.sql to the query you provided.
    SET HEAD OFF FEED OFF ECHO OFF
    SET LIN 120 PAGES 0 TRIMS ON
    SPOOL c:\test.txt
    SELECT memberid || ',12' FROM abc;
    SPOOL OFF
    But,the spool query is still adding additional spaces making length of each line 43 characters in final text file output.

  • IM - Recipient sometimes sees black block instead of text when I use Windows 7 High Contrast theme

    I use Lync client 2010 on 64 bit Windows 7. I like to use the Windows High Contrast Black theme. In Lync this sometimes causes an issue in that the person who I am sending messages to sees some of my messages as a black block/bar in their client (perhaps
    it could be black text on black background). In my client the message looks ok. Any ideas as to what I can do to resolve this would be appreciated as it is an inconvenience to have to switch to a non-high contrast theme every time I am having an IM conversation
    with someone.
    Sincerely,
    Daws

    Hi,
    You can try to the following steps:
    Update Windows 7 and Lync 2010 client to the latest version.
    Try to use Lync 2013 client to have a test.
    If the issue persists, you can feedback on the link below:
    http://blogs.technet.com/b/lync/archive/2012/11/01/lync-app-feedback-you-asked-and-here-it-is.aspx
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • InDesign: how to skew text blocks without distorting text?

    I want to set up several large blocks of copy with these requirements:
    - the baselines of the text are at an angle on the page
    - the left and right edges of the text block are bang-on horizontal (aligned with the guides in the screenshot below)
    - the text block can be enlarged or reduced without changing the angle of the left and right edges
    - the letterforms themselves are not distorted
    This screenshot shows what I'm after.
    This screenshot shows the actual bounding box for the text block.
    This screenshot shows how the angle of the text box changes when I change its size.
    I think Illustrator has some sort of function that allows you to “zero” (reset any transformations to a 90-degree grid) an object after it’s been transformed. Not finding anything at all like that in InDesign. Nor am I finding any means to set a custom constrain angle which would allow me to use the direct selection tool (the white arrow) to change height or width with confidence.
    I would appreciate any tips! Thanks for your attention.

    I do it with the example of turning. Skewing works the same way.
    1. Draw your rectangle, I applied a text frame based baseline grid (textframe options)
    2. With the selection tool or with the transform tool turn the whole frame in a direction, you can do it also with entering the value in the Transform Panel, what I would recommend.
    3. Now select the Direct selection tool (white arrow) and hold down the ALT key and klick on the frame. Now only the frame is selected. Turn it back in the other direction, or insert the value into the transform panel.
    I have also another method to offer:
    Draw the main frame with the text tool.
    Draw a small frame above, it must be much smaller than the main frame.
    Turn the small frame in the direction you want to go the text.
    Select both frames.
    Go to the Pathfinder > Add.
    Now you can add text or select a text frame based baseline grid. It will do the same as above. Maybe simpler.

Maybe you are looking for

  • How to Calculate column (Month, Year) from date or timestamp

    Hi, Name SQL Data Type Dimension Column Store Data Type Key Not Null Default Comment T_STAMP TIMESTAMP LONGDATE How to generate Month and Year from timestamp field in Analytic View. Please provide me some valuable input. I have searched SCN before po

  • I can't use thunderbird 31.2.0 to send attachement from a pdf file with Acrobat PRO XI

    I can't use thunderbird 31.2.0 (Mozilla) to send attachement from a pdf file with Acrobat PRO XI. Each time, Acrobat replies (in french) : "il n'y a pas de client pour la messagerie par défaut". Thunderbird is indicated as "by default" in the list of

  • Sound Fonts: How to record?

    I can get the sound fonts to play in Garageband player but the song sent to iTunes the instruments defaults to the software instruments? And while we are at it is it possible to convert sound fonts to software instruments? imac   Mac OS X (10.4.6)  

  • DECODE Vs CASE  Performance Issue

    Hi, The comparison is on basis of performance. There are billions of records to be processed and millions to be updated. Please go through the folowing queried to have general idea because the actual query is 2 page long. DECODE(EXP,1,VAL1,VAL2) Vs C

  • Blackberry desk top and missing file (apploaderwebsl-upgrade.msi.)

    I am recently having an issue with my Blackberry Desktop and 8820 Blackberry phone from AT & T.  It worked just fine for 6 months then the other day I went to sink my phone and I received the following message.  Cannot fined file apploaderwebsl-upgra