Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Parsing CCL (Common Command Language) commands

by JaWi (Hermit)
on Oct 17, 2002 at 11:57 UTC ( [id://205990]=note: print w/replies, xml ) Need Help??


in reply to Parsing CCL (Common Command Language) commands

Well, you could use Yapp or YALALR to create a LALR parser for you according to a specific (Yacc like) grammar. Since yours is already clearly defined in BNF there shouldn't be much trouble converting it.

Since you didn't specify a particular database, I assume you're free to choose. In that case I would suggest MySQL, since it has this nice RegExp feature, where you can query according to some (simplified) regular expression.
This would allow you to convert your parse tree into a valid (MySQL) regexp. Simply select everything which looks like your regexp and your finished.

Hope it helps (a bit),

-- JaWi

"A chicken is an egg's way of producing more eggs."

  • Comment on Re: Parsing CCL (Common Command Language) commands

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://205990]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2024-04-18 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found