danielkornev / sprache Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/sprache
Automatically exported from code.google.com/p/sprache
e.g.
Parse.Digit.Many().Named("number");
And...
Expected number or date.
Original issue reported on code.google.com by [email protected]
on 20 Jan 2010 at 12:31
What steps will reproduce the problem?
1. hg clone ...
2. cd sprache
3. xbuild
What is the expected output? What do you see instead?
Build FAILED.
Errors:
/Users/jeffreymiller/Projects/sprache/Sprache.sln (default targets) ->
(Build target) ->
/Users/jeffreymiller/Projects/sprache/Sprache/Sprache.csproj (default targets)
->
/Library/Frameworks/Mono.framework/Versions/2.8.1/lib/mono/4.0/Microsoft.CSharp.
targets (CoreCompile target) ->
Parse.cs(430,64): error CS0266: Cannot implicitly convert type `Sprache.Parser<System.Collections.Generic.IEnumerable<T>>' to `Sprache.Parser<T>'. An explicit conversion exists (are you missing a cast?)
Parse.cs(430,64): error CS1662: Cannot convert `lambda expression' to delegate type `System.Func<System.Collections.Generic.IEnumerable<T>,Sprache.Parser<T>>' because some of the return types in the block are not implicitly convertible to the delegate return type
What version of the product are you using? On what operating system?
J-Scott-Millers-iMac:sprache jeffreymiller$ uname -a
Darwin J-Scott-Millers-iMac.local 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov
5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386
J-Scott-Millers-iMac:sprache jeffreymiller$ mono --version
Mono JIT compiler version 2.8.1 (tarball Mon Nov 22 09:52:37 MST 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: normal
Notification: Thread + polling
Architecture: x86
Disabled: none
Misc: debugger softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC)
Please provide any additional information below.
It looks like this is a problem with Mono's generic type inference. I haven't
had a chance to come up with a simple repro case to confirm this, but I have
found that if the lambda declared within the Until parser extension method is
explicitly declared, all is well. The modified method looks like:
/// <summary>
/// Parse a sequence of items until a terminator is reached.
/// Returns the sequence, discarding the terminator.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="U"></typeparam>
/// <param name="parser"></param>
/// <param name="until"></param>
/// <returns></returns>
public static Parser<IEnumerable<T>> Until<T, U>(this Parser<T> parser, Parser<U> until)
{
//return parser.Except(until).Many().Then(r => until.Return(r));
Func<IEnumerable<T>, Parser<IEnumerable<T>>> returnFunc = r => until.Return(r);
return parser.Except(until).Many().Then(returnFunc);
}
Original issue reported on code.google.com by [email protected]
on 30 Dec 2010 at 6:27
Parse.Decimal parses numbers with fractions where the decimal separator is a
".".
This should be replaced with
System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSepara
tor.
Original issue reported on code.google.com by [email protected]
on 28 Dec 2012 at 4:34
E.g. in Ometa a parser can inherit from another parser and extend/modify
productions.
Perhaps not the default/only way to use Sprache, but well worth exploring as
base classes for common kinds of parsers would be a great way to get started
quickly.
Original issue reported on code.google.com by [email protected]
on 5 Jan 2010 at 12:02
For the decimal ".23" is not recognised by Parse.Decimal.
Fix:
http://code.google.com/r/robert-sprache/source/detail?r=bc37605aba52ba0ced6d9268
8b2b1a9b18f60705
Most likely a more succinct way to do it though
Original issue reported on code.google.com by [email protected]
on 21 May 2012 at 1:49
I'm using Sprache through NuGet. The binary that is downloaded does not include
the XML Comments that exists in the source code.
Original issue reported on code.google.com by [email protected]
on 28 Dec 2012 at 1:53
Technique described here should be possible to implement:
http://www.moserware.com/2008_07_01_archive.html
Original issue reported on code.google.com by [email protected]
on 8 Jan 2010 at 12:39
Turn on XML comment generation and set warnings-as-errors.
Original issue reported on code.google.com by [email protected]
on 4 Jan 2010 at 1:25
Currently the absolute position is reported, rather than "line x, column y",
making it hard to debug parse errors on large inputs.
Original issue reported on code.google.com by [email protected]
on 21 Jun 2010 at 3:30
I.e. a Google Group.
Original issue reported on code.google.com by [email protected]
on 4 Jan 2010 at 1:24
Sprache doesn't currently use any .NET 4.0 specific features, so it can be
downgraded to 3.5.
Patch:
http://code.google.com/r/mauricioscheffer-1/source/detail?r=8dd42ab88fb3c9102918
e1f6634f5bc40fc59c54
Original issue reported on code.google.com by [email protected]
on 2 Nov 2011 at 3:43
My experience so far is that it is extremely important to write tests against
your grammer to verify the parsing behavior. What would make that easier would
be if the AssertParser was distributed along with the library. I think the
classes for ResultHelper, Success and Failure would need to be public as well.
Is this something we could look forward to in a future release? I know it's
open source and I could make the changes to a fork but I hate to do that if
it's something that is a common need and you would be open to.
Original issue reported on code.google.com by [email protected]
on 9 Apr 2012 at 8:16
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.