LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Parser Test 2 (Something a bit more ambitious, maybe?)

Posted 01-03-2013 at 01:36 AM by rainbowsally

Parser Test 2 (Something a bit more ambitious, maybe?)

Here's test2.

Features:
  • Lots of custom parser funcs in order to create a parser for algebraic expressions. See 'expr' 'times', and all that good stuff in the source file 'src/test2.cpp' below.

This is the output from a session.
Code:
Input some math expressions and maybe we can identify them.
Type 'quit' to end
3b + 5 * 4e-5 / (2 * 5) + 4
<--------------------------->
...
Member
Posted in Uncategorized
Views 670 Comments 0 rainbowsally is offline
Old

Parser Test 1

Posted 01-02-2013 at 08:24 PM by rainbowsally
Updated 01-02-2013 at 08:26 PM by rainbowsally

Parser Test 1

------------------------------------

See the previous blog entry: "Playing with parsing" here.
http://www.linuxquestions.org/questi...wsally-615861/
to grab the files we need to include for these tests and a working mc2 definitions file for those who have mc2. Type "mc2 -init" first time. After that "make update" will add/remove files from the makefile.

[Note that we can link OR include...
Member
Posted in Uncategorized
Views 1138 Comments 0 rainbowsally is offline
Old

Playing with parsing

Posted 01-02-2013 at 07:46 PM by rainbowsally
Updated 08-06-2014 at 08:36 AM by rainbowsally (typo correction)

Playing with parsing

Today's features:
  • Creating an extensible mid-level parser that makes sense in C.
  • Looking at BNF-like syntax and C syntax similarities.
  • Tossing flex as far as we can throw it. While its still burning.

The file set here isn't 'finalized' in any way but it's been stable for a few days. These examples are therefor not about THIS set of functions but about parsing in general, although this file set will very likely be part of the mc2 parsing system...
Member
Posted in Uncategorized
Views 1088 Comments 0 rainbowsally is offline
Old

https problem in transparent proxy

Posted 01-02-2013 at 04:21 AM by nandhapswan

I have configured squid as transparent proxy. But my users can not access the sites having https. Logically I should use iptables to redirect all the traffic.

The quick response will highly appreciated.

--
Regards,
Nantha....
LQ Newbie
Posted in Uncategorized
Views 5177 Comments 1 nandhapswan is offline
Old

haskell: get lines and handle end of file

Posted 01-01-2013 at 02:23 AM by hydraMax (Bits and Pixels)
Updated 01-01-2013 at 02:27 AM by hydraMax
Tags haskell

I thought I'd post this convenience function, since I didn't see an obvious one in base:

Code:
import Prelude hiding (catch)
import Control.Exception
import System.IO.Error hiding (catch)

readl f = catch (getLine >>= return . Just)
                (\e -> if (isEOFErrorType . ioeGetErrorType) e
                         then return Nothing
                         else ioError e)
          >>= \a -> case a of
...
Member
Posted in Uncategorized
Views 1464 Comments 0 hydraMax is offline

  



All times are GMT -5. The time now is 05:07 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration