Regular expression token antlrV3
Can I write a rule where the initial token is partly fixed and partly generic? rule: ID '=' NUMBER ; ID: (A.. Z | a.. Z) + NUMBER: (0 .. 9) + But only if the token ID is in the form var* (var is fixed) Thanks ...
Can I write a rule where the initial token is partly fixed and partly generic? rule: ID '=' NUMBER ; ID: (A.. Z | a.. Z) + NUMBER: (0 .. 9) + But only if the token ID is in the form var* (var is fixed) Thanks ...
Hello All, Please help with me writing a JavaScript Validation for currency/money field. So please provide any regular expressions if u have :) Also, for my region, don't need any currency symbols like '$' in the field. Only decimals are to be included for validation as special chars., along with numbers. ...
hello, I have this piece of code can you explain me the output unsigned int x=3; ~x; printf("%d",x); output is 10 I am not able to make it how. I have compiled the code on turbo c ...
Hi, I'm trying to get text from in between 2 html tags, only the difficulty is that the tag can differ from name. I'll explain into detail: <icon displayid="62115">inv_helmet_130</icon> I have to get the inv_helmet_130 But the displayid of the tag can differ, any ideas on how to solve this? Perhaps with a regular explression b...
Hi All, We are trying to use Web Expression 3.0 feature SuperPreview to make our site consistent across multiple browsers. Our's is a MVC 1.0 application. Has anyone tried to use SuperPreview on that ? Your advise will be very helpful. ...
Hello! As you know, if we simply do: >>> a > 0 Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> a > 0 NameError: name 'a' is not defined Is there a way of catching the exception/error and extracting from it the value 'a'. I need this because I'm evaluating some dynamically created expressions, and woul...
Hello, I am writing an application that allows a user to enter a boolean expression. I need the ability to evaluate the entered boolean expression at runtime and am looking for both a parser and a expressoin validator. Parser The parser needs to take a boolean expression as a string and return true/false. Example: string expression...
Is anyone aware of an online resource where I can find out how to write a simple expression parser using Boost::Spirit?. I do not necessarily need to evaluate the expression, but I need to parse it and be able to return a boolean to indicate whether the expression is parsable or not (e.g. brackets not matching etc). I need the parser t...
I need a regex expression for matching a string in quotes and then a white space then a round bracket then a curly bracket. For example this is the text I want to match in Java: "'Allo 'Allo!" (1982) {A Barrel Full of Airmen (#7.7)} What would the regex for this be? Sorry, but I'm just really lost. I tried a lot of different things b...
I right click on a button. Select edit template edit a copy. The template is blank and not the template of the button. This happens off and on. WHY???? ...
Happy friday folks, awesome. I am currently writing a small tooltip mimicking control to display inline help in an application. I was going to just use standard tooltips but decided that I potentially wanted interactivity. I have it working no problem. Its quite literally an implementation of ContentControl with a ControlTemplate trigg...
I've been trying to learn more about using Lamba expression trees and so I created a simple example. Here is the code, this works in LINQPad if pasted in as a C# program. void Main() { IEnumerable<User> list = GetUsers().Where(NameContains("a")); list.Dump("Users"); } // Methods public IEnumerable<User> GetUsers() { yield r...
I have VS 2008, and looking forward to moving fairly quickly to VS2010. Our applications (we only have a few) are all winforms apps - mostly VB. I want to start to learn WPF. My version of Expression Studio is version 2. I have heard that the improvements made from version 2 to version 3 are significant. If it follows the paradigm o...
I have the following text, I need to extract the exception name and the continuing sentence from the file, but the file has continuous sentences without a space. ??????>????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????...
I have standard arithmetic expressions sotred as strings eg. "WIDTH * 2 + HEIGHT * 2" In this example WIDTH and HEIGHT references other objects in my system and the literals WIDTH and HEIGHT refers to a property (Name) on those objects. The problem I'm having is when the Name property on an expression object changes the expression won...
How would I express the following java code in scala? a = b = c; By the way, I'm re-assigning variables (not declaring). ...
Consider the following code which shows compile time error : #include <stdio.h> int main(int argc, char** argv) { int x=5,y=0,z=2; int a=z?x,y?x:(y); // but z?x,y?x:y:z is not showing any error printf("%d",a); return 0; } Please help me explain the reason why z?x,y?x:y:z is not showing any error? ...
Hello guys, at the moment I'm really interested in expression templates and want to code a library for writing and differentiating mathematical functions with a lambda-style syntax. At the moment, I'm able to write (_x * _x)(2); and get the correct result 4. But I would really like to do something like MathFunction f = _x * _x; f(2);, b...
I’ve built a site in ExpressionEngine for some holiday apartments (EE1.6.8), that uses two related weblogs for bookings. ‘apartments’ & ‘booking’ Bookings are set up as weblog entries using the entry_date for arrival and expiration_date for leaving date, and are related back to the apartment that is booked. I’ve built a page that list...
I want to evaluate one expression in C++. To evaluate it, I want the expression to be converted to prefix format. Here is an example wstring expression = "Feature1 And Feature2"; Here are possible ways. expression = "Feature1 And (Feature2 Or Feature3)"; expression = "Not Feature1 Or Feature3"; Here And, Or, Not are reserved w...