Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Group info
Language: English
Group categories: Not categorized
More group info »
Active older topics
3 new of 3 - Feb 19 2011
3 new of 3 - Feb 8 2011
2 new of 2 - Feb 7 2011
2 new of 2 - Feb 3 2011
3 new of 3 - Jan 26 2011
8 new of 8 - Jan 25 2011
7 new of 7 - Jan 23 2011
1 new of 1 - Jan 17 2011
3 new of 3 - Jan 12 2011
2 new of 2 - Jan 12 2011
Discussions
View:  Topic list, Topic summary Topics 1 - 10 of 20  Older »
Description: Discussion around the Citrus parsing expression library for Ruby
http://mjijackson.com/citrus
 

Parsing a string with special characters 
  I've this *grammar* which defines a rule for parsing strings ...It works really well for every string unless I'm parsing a string with special characters. The main problem appears when I've to parse a string like *%q("\\ \0 \" \t \n \r")* I expect to return *"\\ \0 \" \t \n \r",* but this rule stops when reads ".... more »
By Emiliano Mancuso  - Mar 1 - 11 new of 11 messages    

Help with interpretation 
  Hello, all. This is my first time using Citrus, and I am having trouble. I don't know what the source of my problems is, so I'd love your help. I haven't worked at the grammar lexer/parser/interpreter problem for over ten years, so apologies for any egregious failures. I am attempting to create a language that will allow for users of the... more »
By Jim Van Fleet  - Jan 24 - 3 new of 3 messages    

Repeating sections 
  Citrus is awesome, but I have one question. I really need parse something like: key1 ... key2 ... key3 ...and get something like this: [ ...But I cannot realize how to parse such repeating. Can anybody please help me? Thanks.
By a.ognev...@gmail.com  - Jan 15 2012 - 1 new of 1 message    

infinite running 
  Hi, If I run below parsing code, Citrus.eval (<<CITRUS) grammar Good rule inf ( [a-z]* "!"* )* end end CITRUS Good.parse("good!better!!best! !!", :root=>:inf), which runs and never ends, what's the problem root cause?
By Ken  - Jan 4 2012 - 2 new of 2 messages    

Citrus require 
  Hi, In the following example copied from [link] require 'ipv4address' # (1) require 'ipv6address' grammar IPAddress include IPv4Address include IPv6Address rule IPaddress IPv4address | IPv6address... more »
By Ken  - Dec 29 2011 - 4 new of 4 messages    

wired question mark 
  grammar TestQ rule test /a/ " "+ | /(\s*\r\n)+/ end end str = " \r\n" match = TestQ.parse(str) The above code can parse the string, however, if I add a question mark after /a/ to make it optional like this, /a/? " "+ | /(\s*\r\n)+/ then it will fail, why is the problem?... more »
By Ken  - Dec 26 2011 - 6 new of 6 messages    

zero-or-one not works when used with ordered choice 
  I tried below grammar and a simple testing code, can I say that the question mark is not working when used with a followed ordered choice? see the test result below. ...grammar Question rule qm /xyz/? | "issue" end end ------------------------------ ---- require "citrus" Citrus.load "question"... more »
By Ken  - Dec 26 2011 - 4 new of 4 messages    

How to get more information about parse errors? 
  Hi, Not trying to spam the list... honest! :) Another question: how do you tell what rule failed to match during the parse? Looking at the code, there's no way to get access to the parser state from the Citrus::SyntaxError instances. I apparently have a non-terminal rule that's ambiguous because Citrus doesn't seem to be treating an optional rule component as optional when marked with '?'. If I mark it with a '*' instead, it parses as I'd expect, but I'd really like to know/understand more about what's going on so I could possibly fix the input grammar to resolve the issue rather than having to deal with raising a parse error on multiple matches myself.... more »
By Andrew S. Townley  - Apr 13 2011 - 3 new of 3 messages    

Diagnosing issues with #resolve! method 
  Hi folks, I've been playing around the last couple of days trying to translate a context-free grammar defined by an ISO specification into a Citrus grammar. I'm new to Citrus, and relatively new to PEGs, but I did implement a couple of simple grammars using Treetop in the past. About 17 years ago, I used to be relatively up to scratch with lex and yacc, but my compiler building and compiler theory chops are somewhat rusty these days... ;)... more »
By Andrew S. Townley  - Apr 13 2011 - 2 new of 2 messages    

Returning a curly brace in a value 
  I'm just now learning Citrus, great stuff so far. I'm trying to set the value of a rule to include a curly brace and it raises parsing errors on the grammer. Example: rule method (def space method_name statements ends) { "#{method_name.value} = function() { #{statements.value} }"... more »
By ryan  - Apr 7 2011 - 2 new of 2 messages    

1 - 10 of 20   « Newer | Older »

XML       Send email to this group: citrus-users@googlegroups.com