473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

java parser

Hello everybody :)
I've got a question. I want to know how can I write a parser
"There is a table(dimension: 3 in 4 in 5 meters) in the room"
in a way that the output would be this:
Type: table
Numbers: 1
Size: 60 M^3
Position: Room

I tried substring and split method, but I didn't get the result that I wanted. Could you please help me with this? :( What are the useful methods with which I can write this code?
Oct 21 '13 #1
2 1777
chaarmann
785 Expert 512MB
Use regular expression.

But the better way: define an EBNF-like grammar and then use some ready-made method that converts them into a tree of tokens.
Look in Wikipedia, "Recursive descent parser" for an example.
Oct 21 '13 #2
Thank you So much :) I read the wikipedia page. It might be a good idea but I want a simpler and shorter way. again thanks :)
Oct 21 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ed Trubia | last post by:
Looking for a grammar / parser that will allow me to convert ada to java. I have a very large ada program, that for the most part need to converted to java. Jgnat is not an option because of our...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
0
by: Juan Manuel Fernández Luna | last post by:
Can anybody help me? I'm desperate!!! I'm writing a program in Java to deal with xml files and when the file volume.xml (attached) is being parsed, the following exception occurs and I don't...
7
by: Frank | last post by:
I am looking for a reccomendation as to what Java parser I should be using. I'm looking for something that is freely distributed, has documentation, and has a wide user base. Any suggestions?
3
by: Johan | last post by:
Hello, Where can I find examples of how to read XML files with DOM johan
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
1
by: Ethel | last post by:
I want to use a validating XML parser on my machine. I downloaded Xerces2 Java Parser 2.8.0 Release binary files, which includes the documentation. Unfortunately I can't find any instructions on...
9
by: Peter Michaux | last post by:
Hi, Does a parser generator exist that generates JavaScript code? Most parser generators generate C or Java code. Thanks, Peter
29
by: Dexter | last post by:
This Java based utility may be invoked from Java code to parse mathematical expressions. It is useful for programmers developing calculators, graphing utilities or other math related programs. ...
7
mickey0
by: mickey0 | last post by:
Hello, I have to write a descendant recursive parser in Java. what do you suggest? Any links with java code example, please? Regards,
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.