John Gietzen
John Gietzen
We need to consider cases where Grammar.peg references Lib1.peg and Lib2.peg which both reference a fourth file, Shared.peg Another thing to consider, how would you export rules imported from another...
Relevant discussion: https://github.com/pegjs/pegjs/issues/38
I would like input on this syntax proposal which is inspired by [TypeScript's modules](https://www.typescriptlang.org/docs/handbook/modules.html). ``` @import { a, b, c, whtespace as ws } from OtherNamespace.Lib3; ``` Because this would...
This would extend upon the -lexical option.
The Syntax Highlighting code from the Pegasus grammar has been moved into Pegasus.Common. Language service template is still a TODO.
Plan is to make a template project for Pegasus+Weave+Language service.
So, there is actually an inconsistency in Pegasus' handling of the ignore case flag. For strings, this logic is used: if (ignoreCase ? substr.Equals(literal, StringComparison.OrdinalIgnoreCase) : substr == literal) Whereas...
A workaround for Pegasus 4.1 is to use a [more specific lexical structure as C# does](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#identifiers), e.g. using [char.IsLetter](https://docs.microsoft.com/en-us/dotnet/api/system.char.isletter): name = (letter letterOrDigit*); letter = c:. &{ char.IsLetter(c[0]) }; letterOrDigit...
You can kind-of do this via three approaches, - resource strings - If you want to swap out predefined strings, consider using resource strings. This was designed to support language...
Pegasus 4.0 added support for composite grammars. Here's the wiki article: [How do I reference an exported rule from another parser?](https://github.com/otac0n/Pegasus/wiki/How-Do-I...-%3F#how-do-i-reference-an-exported-rule-from-another-parser) You can also look at the Pegasus source code,...