How could i parse string and link its model with my files in eclipse project?

How could i parse string and link its model with my files in eclipse project?, as i read that we dont have to use standalone mode while working with eclipse projects.
Example of what i want to do:
I have file1.dsl in my project which contains some statements but the declaration of these statements are not in another file, i need to put them only in my code

Hi Stefan,
I have eclipse project contains 2 files, file1.dsl and file2.dsl, you can see the contents of the files below.
file1.dsl contains some statements as shown below and file2.dsl contains the declarations of the variables. (like in C++ or Java we have declarations and usage)
At this step file1.dsl and file2.dsl will be parsed successfully without any errors.
Lets imagine that we will delete this project and will create another one and the new project will contain only file1.dsl (which contains the usage)
At this step this file (file1.dsl) will contains some errors after parsing it, because we are using variables without declarations.
So what i need is to parse the content of file2.dsl directly without adding this file to the project.
I need to add the content of file2.dsl directly as a string in the code and parse it. just like that ( "int a;int b;" )
And link file1.dsl with the model generated after parsing my string
file1.dsl
a++;
b++;
file2.dsl
int a;
int b;
Thanks

Similar Messages

  • How could I create ObjectInputStream and use it indefinitely with Servlets?

    Hi All,
    I would like to create the stream object between applet and server only once with urlConnection.openConnection() and use it to write objects to it indefinitely without reinstantiating it or getting another connection with urlConnection.openConnection() and repeatedly query for another input / output stream with servletOutputStream = new ObjectOutputStream (servletLinkup.getOutputStream()); How could this be done?
    Devyn

    Dear vladimp,
    The thing is, you need to ask good questions to receive good answers.Have you ever written a servlet vladimp? More specifically, have you ever written client - server code and have the two sides send objects to each other over the HTTP protocol?
    This question is directed towards those developers who have done similar code and may have suggestions regarding this post.
    What have you tried and how exactly has it failed for you?Quote from my post: "I would like to create the stream object between applet and server only once with urlConnection.openConnection() and use it to write objects to it indefinitely without reinstantiating it or getting another connection..." - that is, every time I want to write another object to the stream. Apparently whatever I tried didn't work, hence I'm posting here. Maybe someone with more servlet development experience would be willing to shed some light on this.
    Why do you think the overhead of wrapping ObjectInput/OutputStreams
    around the URL stream is large?Why do you believe I care if the overhead is large? My question is about maintaining a persistent connection to a servlet not overhead.
    Have you made use of OutputObjectStream.reset()?This is actually a legitimate question (even though it's an ObjectOutputStream not a OutputObjectStream). The answer is YES I tried and NO it didnt' work. Could be that anything sent has to be followed up by a .flush() or/and a .close() to actually trigger the stream to send the object. At least according to some sources (I'm trying to verify this).
    How about some sample code that reproduces the issue?URLConnection servletLinkup = urlConnection.openConnection();
    servletOutputStream = new ObjectOutputStream (servletLinkup.getOutputStream());
    Should be obvious for someone who did it before.
    What is it about this problem that warrants a post to Advanced
    Language Topics forum vs, say, Serialization forum?Testosterone driven guru java developers. Perhaps this could also go under the 'Java Servlet Technology' section as well, who knows, there's so many to choose from. I've actually gotten some very creative replies regarding this in other places. I can't say I didn't enjoy this post, however. 8^D. Thnx to all who have read the post.
    Devyn

  • How to create a file and store its contents into another file?

    Hi,
    I'm having some trouble trying to create a code where I have to to create a file and store its contents into another file?
    I read the API, but I'm not certain how this file thing works.
    Here's my code so far:
    public static void main(String[] args) throws Exception
              File file = new File("tasks.txt");
              if (file.exists())
                   System.out.println("File already exists");
                   System.exit(0);
              Scanner scan = new Scanner(System.in);
              Scanner scan2 = new Scanner(System.in);
              //Scans the input line by line
              scan.useDelimiter("\\n");
              //Scans the input by tabs
              scan2.useDelimiter("\\t");
              PrintWriter outputs = new PrintWriter("newtasks.txt");
              outputs.print("ok");
              outputs.println(3);
              outputs.close();
         }

    I managed to change my text into uppercase, but how do I store the uppercase content into another file.
    -So this is what I did so far, I took a text file and modified its strings to uppercase.
    -Now I need to put those modified strings into another text file, is there a way where I can do that with my current code?
    -I already tried printwriter, but it doesn't seem to work
    public static void main(String[] args)throws IOException
              //Task[] oneHundredTasks = new Task[100];
              String uppercase;
              String combine;
              Scanner scan = null;
              FileInputStream in = null;
            FileOutputStream out = null;
            PrintWriter output = null;
            try
                 scan = new Scanner(new BufferedReader(new FileReader("tasks.txt")));
                 scan.useDelimiter("\\n");
                 scan.useDelimiter("\\t");
                while (scan.hasNext())
                     if(!scan.hasNext())
                          scan.next();
                     combine = scan.next();
                     uppercase = combine.toUpperCase();
                     System.out.println(uppercase);
            finally
                if (scan != null)
                    scan.close();
            //The program will try the input and output files
            try
                 in = new FileInputStream("tasks.txt");
                out = new FileOutputStream("newtasks.txt");
                int c;
                //The number "-1" is used to indicate that it has reached the end of the stream.
                while ((c = in.read()) != -1)
                    out.write(c);
            finally
                if (in != null)
                    in.close();
                if (out != null)
                    out.close();
         }

  • How to Break this String and put into a Table

    Hi all,
    Currently i working on the Reading of Csv file.THe Csv file wil be stored as BLOB in one table.
    The Format of the Csv file is
    EMPCODE :DATEOFBIRTH
    312089 ,12/01/1984
    321456 ,03/05/1980
    120212 ,04/08/1987
    312456 ,23/12/1977
    311110 ,12/04/1998
    323232 ,20/06/1990
    UPLOAD_BLOB
    column     Datatype
    UploadId Number
    File_details BLOB
    And i reading the BLOB in one procedure and i m getting the String as like this ---->
    "312089 ,12/01/1984
    321456 ,03/05/1980
    120212 ,04/08/1987
    312456 ,23/12/1977
    311110 ,12/04/1998
    323232 ,20/06/1990"
    I am Dont know how to Parse this String and put in table
    While 1<STRING.LENGTH
    LOOP
    EMPCODE=SUBSTRING();
    DATEOFBIRTH=SUBSTRING();
    INSERT INTO TABLE VALID_EMPCODE(EMPCODE,DATEOFBIRTH)VALUES(......);END LOOP
    VALID_EMPCODE
    EMPCODE VARCHAR2(30)
    DATEOFBIRTH VARCHAR2(15)
    Can any one tell me how to parse this whole string and break them

    Duplicate post
    How to Break this String and put into a Table

  • My QuickTime player us not playing .avi files and says I need a codec I can't play no .avi files on QuickTime. How could I fix this because I want to play these files with QuickTime.

    My QuickTime player us not playing .avi files and says I need a codec I can't play no .avi files on QuickTime. How could I fix this because I want to play these files with QuickTime.

    Hmm . . . comes with a Utility MPEG2 Component ML app with no explanation of what it's for?
    The utility app is an "assistant PKG installer." It allows Lion and Mountain Lion users to install the older QT MPEG-2 Playback Component installer PKG file which is not allowed to run on its own under Lion or Mountain Lion since these operating systems already have a QT X only MPEG-2 component embedded in the QT embedded structure. Without this utility you would have to either copy the component from an older system to your Lion or Mountain Lion system, use Pacifist for installation, or manually open the PKG contents and transfer the component to the appropriate component folder.
    As to your "discussion" regarding the playback of AVI file types, there are really only two strategies here:
    1) You can add component support so that QT can play the files natively or
    2) You can convert the file contents to compression formats that are natively compatible with the unmodified QT component configuration.
    Each user should decide for his or her own self which approach best suits their needs for a particular source file. In most cases, conforming the system's codec component configuration to play the source file directly results in higher video quality since no transcoding takes place but this strategy will not work if a codec which is required is not available for the user's operating system. On the other hand, converter utilities tend to support more built-in codecs and are easier to use since the user does not have to concern him or herself with the nature of the particular source compression formats but at the risk of some potential loss in visual quality. As to what converter to use, once again this is a matter of personal choice. In the case of commercial converters like iSkysoft, the codecs are built in while MPEG Streamclip accesses the host operating system's QT codec component configuration. I personally prefer the free HandBrake app for AVI, MKV, TS, MTS, and M2TS conversions since it has an exceptionally full-featured X.264 GUI with some user options that 97% of users are likely to never use.

  • HT4009 Apple charged me £20.99 for in-app purchase for an app I just bought an hour ago while I did not bought any in-app purchase. How could I make claim and refund this money?

    Apple charged me £20.99 for in-app purchase for an app I just bought an hour ago while I did not bought any in-app purchase. How could I make claim and refund this money?

    If you didn't make an in-app purchase within the app then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    You may also want to turn off in-app purchases via Settings > General > Restrictions > In-App Purchases 'off'

  • How to eliminate those advertisements and links to videos??? is a real mess !!!!

    Please advise how to eliminate how to stop those advertisements and links to videos on the skype IMessage... is terrible !!!!

    If you would like a refund you'll need to contact iTunes Store support directly. If you would like help with a problem, post here and we'll do our best to help you.

  • How to retrieve the path and the name of the destination file in a link annotation

    Hi,
    In C++:
    How to retrieve the path and the name of the destination file in a link annotation and a Launch action.
    Sample of my code:
    //Determine if the annotation is a Link annotation
    if (PDAnnotGetSubtype(annot) == ASAtomFromString("Link")) {
    //Determine if the action is a Launch action
    if (PDActionGetSubtype(action) == ASAtomFromString("Launch")) {
    // What is the method ?
    Regards
    David G

    In general, get the annotation as a Cos object and examine it, in
    accordance with the PDF Reference.
    Aandi Inston

  • Read a excel file and split its sheets to seperate file ?

    Dear all :
    How to split a excel file into several file, each have one sheet.my code is as below,thanks:
    import org.apache.poi.hssf.usermodel.*;
    import java.io.*;
    import java.util.*;
    import org.apache.poi.poifs.filesystem.*;
    public class Extractxls {
    public static void main(String[] args) throws Exception
    try {
    POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(args[0]));
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    int sheetCount = wb.getNumberOfSheets();
    System.out.println(sheetCount);
    try {
         while(sheetCount > 0) {
         sheetCount--;
         HSSFWorkbook wb1 = new HSSFWorkbook();
         HSSFSheet s = wb1.createSheet();
         String sheetName = wb.getSheetName(sheetCount);
         HSSFSheet sheet = wb.getSheet(sheetName);
    //     HSSFSheet sheet = wb.getSheetAt(sheetCount);
         System.out.println(sheet.toString());
         s = sheet;
    FileOutputStream fileOut = new FileOutputStream("atest" + sheetCount + ".xls");
    wb.write(fileOut);
    fileOut.close();
    } catch (Exception e) {
         System.err.println("Error: " + e.getMessage());
    } catch (Exception e) { e.toString();}

    The HSSFWorkbook class is part of the POI project:
    http://jakarta.apache.org/poi/
    Regards,
    Dave Gilbert
    JFreeChart Project Leader
    I understand poi porject, my problem is that POI can not read a excel file and split its sheets into seperate file (each have one sheet) ?Does any one know how to do it.

  • How do I access classes and methods defined in a wsdl file

    I have been provided a wsdl file I need to find out how do I access classes and methods defined in a wsdl file directly instead of doing a wsdl2java...

    Several comments :
    1- is there any reason to have blank chars inserted after the path ? Seems that you already have a problem there. If possible, try to solve the problem at the source
    2- the end of line char is usually CR (Carriage Return, aka ASCII char 13 = $0D = Control-D). But LF (Line Feed = 10 = $0A = control-A) is also used (platform dependent). In LV, you can use the "Concatenate strings" function to add/insert control chars (found in the String Control Palette). However, this will not solve your problem of unwanted added blank chars at the end of your string.
    3- you can use the Trim white space.vi (in the "Additionnal string functions" sub-palette) to remove ALL the spaces in your string
    4- you can build your own "end space remover" function. :
    reverse the string, wire to a "Match pattern" function, use " +" (space + "+") to search for any number of spaces, reverse again the "after substring".
    5- there is no point 5 :-)
    You may find interesting description of ASCII chars here
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How do I text back and forth between iPads with only wifi capabilities

    How do I text back and forth between iPads with only wifi capabilities

    Using FaceTime http://support.apple.com/kb/ht4319http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/http://www.apple.com/ca/ios/messages/
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Set Up Alert Sounds
    http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3
    Extra FaceTime IDs
    http://tinyurl.com/k683gr4http://tinyurl.com/k683gr4
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htmhttp://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Fix Can’t Sign Into FaceTime or iMessage iOS 7
    http://ipadtutr.com/fix-login-facetime-imessage-ios-7/http://ipadtutr.com/fix-login-facetime-imessage-ios-7/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.htmlhttp://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457#19087457https://discussions.apple.com/message/19087457#19087457
    How to watch FaceTime calls on the big screen with Apple TV
    http://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetimehttp://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetime
    Send an iMessage as a Text Message Instead with a Quick Tap & Hold
    http://osxdaily.com/2012/11/18/send-imessage-as-text-message/http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.htmlhttp://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    How to Receive SMS Messages on an iPad
    http://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.htmlhttp://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.html
    Apps for Texting http://appadvice.com/appguides/show/apps-for-textinghttp://appadvice.com/appguides/show/apps-for-texting
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • My daughter and i share an itunes account. how do i delete her and set her up with her own?

    my daughter and i share an itunes account. how do i delete her and set her up with her own?

    You need to make an iTunes Store account in her name and with her unique Apple ID. Note that everything she has purchased and downloaded under your Apple ID will not transfer to hers. She will need (or you will) to repurchase all of her iTunes Store items.
    She will also need her own user account on the computer if you share the same computer.

  • How to run the report and show the output in excel file

    salam
    how to run the report and show the output in excel file,
    how to run the report and print the o/p via printer
    how to run the report and send the o/p via mail
    thank u all

    Hi,
    There are Parameters DESTTYPE, DESFORMAT and DESNAME. You can set these parameters to get as you want.
    1) Output in Excel File
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         ADD_PARAMETER(PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'DELIMITED');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<file_name>.XLS');2) output to printer
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<printer_name>');3) Email - Have to configure SMTP and all. ( i didn't checked it)
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'MAIL');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<email_id>');Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • How to insert a shoutbox and a counter in a flash file with html code?

    How to insert a shoutbox and a counter in a flash file with
    html code?
    Code shout box
    <!-- BEGIN MYSHOUTBOX.COM CODE -->
    <iframe src="
    http://489676.myshoutbox.com/"
    width="152" height="300" frameborder="0"
    allowTransparency="true"></iframe>
    <!-- END MYSHOUTBOX.COM CODE-->
    Code compteur
    <script type="text/javascript" src="
    http://www.123compteur.com/counterskinable01.php?votre_id=268303"></script><noscript><a
    href="
    http://www.123compteur.com"
    target="_blank">compteur</a></noscript>

    thx =D

  • How can I scroll messages and folders in Mail with Maverick? It's unacceptable for Apple

    How can I scroll messages and folders in Mail with Maverick? It's unacceptable for Apple to have allowed this to happen

    This problem has been discussed extensively in this thread:
    https://discussions.apple.com/thread/5481937?start=0&tstart=0

Maybe you are looking for

  • Any App that will bi-directionally sync iPod Touch with Windows Desktop Outlook 2010 Tasks?

    Hi All iPod Touch 3rd gen iOS v 5.1.1 iTunes (for Windows) v 10.7.0.21 Windows 7 32 bit Desktop PC Outlook 2010 32 bit with POP3 mail server Appigo ToDo app on iPod Touch I reside in Canada I have been using Appigo's ToDo Task Manager app on my Touch

  • Can't see Documents folder in Finder, but can see it in Terminal

    I have a MacBook Pro, OS 10.6.5. My Documents folder does NOT appear in a Finder window, but I can see it using the ls command in Terminal. Documents is not an invisible file in the UNIX sense; its name is NOT ".Documents" Below is a copy of the line

  • Why are all the apple based Apps free for my cousin

    Me and my cousin both have Apple iPad minis and for some reason all his apple based apps like iMovie Keynote and iPhoto are all free and I have to purchase them and have already purchased iMovie fro $10:49

  • Regardin bdc

    i have legasy data  in flat file        in that flat file there is  "company ID" (HP ID) field, but in my transaction scree there is no filed of COMPANY ID (HP ID) so in need to up load this HP ID data into the database . what is the approach can i f

  • SLD Data Supplier Bridge

    I am not able to start SLD Data Supplier Bridge. Any help appreciated.