Note that there are some explanatory texts on larger screens.

plurals
  1. POcustom regular expression parser
    primarykey
    data
    text
    <p>i would like to do regular expression matching on custom alphabets, using custom commands. the purpose is to investigate equations and expressions that appear in meteorology.</p> <p>So for example my alpabet an be <code>[p, rho, u, v, w, x, y, z, g, f, phi, t, T, +, -, /]</code> NOTE: the rho and phi are multiple characters, that should be treated as single character.</p> <p>I would also like to use custom commands, such a <code>\v</code> for variable, i.e. not the arithmatic operators.</p> <p>I would like to use other commands such as <code>(\v).</code> <em>note the dot</em> should match <code>dx/dt</code>, where <code>x</code> is a variable. similarly, given <code>p=p(x,y,z)</code>, <code>p'</code> would match <code>dp/dx</code>, <code>dp/dy</code>, and <code>dp/dz</code>, but not <code>dp/df</code>. (somewhere there would be given that <code>p = p(x,y,z)</code>).</p> <p>I would also like to be able to backtrack.</p> <p>Now, i have investigated PCRE and ragel with D, i see that the first two problems are solvable, with multiple character objects defined s fixed objects. and not a character class.</p> <p>However how do I address the third?</p> <p>I dont see either PCRE or RAGEL admitting a way to use custom commands. Moreover, since I would like to use backtrack I am not sure if Ragel is the correct option, as this wouuld need a stack, which means I would be using CFG.</p> <p>Is there <em>perhaps</em> a domainspeific language to build such regex/cfg machines (for linux 64 bit if that matters)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload