Giter VIP home page Giter VIP logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I have reformulated the question so maybe it is more understandable:

I have a language that can basically be in the next form:

ROOT+S36+S35+S34.......+S15+S14.........+S2+S1

but there are restrictions that make the root appear with only some suffixes 
and not with all the 36, for instance:

[ ~$[S36 ?* [S20|S12|S2]];  ! S36 can not combine with S20, S12 or S2
[S14 => ?* _ ?* S7 ?*]; ! Every time that S14 appears, S7 must also appear
[[S10 => ?* S12 ?* _ ?* S8] | [S10 => ?* _ ?* S7 ?*]]; ! Every time S10 
appears, it must appear either between S12 and S8, or with S7
etc.
and here comes the one I don't know how to express in regex:

! Every time the sequence [?* S36 ?* S20 ?* S5 ?*] appears, it must appear S8 
between S20 and S5, like this: [?* S36 ?* S20 ?* S8 ?* S5 ?*]

That is the question, and thanks again......

Original comment by andreschandiaf on 20 Mar 2015 at 9:34

from foma.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
First, this part:

[S10 => ?* S12 ?* _ ?* S8] | [S10 => ?* _ ?* S7 ?*]

should probably read:

[S10 => S12 ?* _ ?* S8 ,  _  ?* S7]

(that's how two contexts are specified; also you don't need ?* at edges)

The actual question is: when you see ?* S36 ?* S20 ?* S5 ?*, S8 must appear 
between S20 and S5. This seems like it's doable without context restriction, 
like so:

~$[?* S36 ?* S20 ~$S8 S5 ?*]

Original comment by [email protected] on 21 Mar 2015 at 3:03

from foma.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Ok, thanks a lot for the two things, great! I see it now!

Original comment by andreschandiaf on 21 Mar 2015 at 3:10

from foma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.