Git Product home page Git Product logo

tinypg's People

Contributors

jissai avatar tomspilman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tinypg's Issues

VB.NET template is not updated

With the new features that are made available in this version, not all are implemented in the VBNET template
Example line number is not emplemented or is atleast not working

Add Better Generated File Warning

Currently it generates a comment like this:

// Generated by TinyPG v1.3 available at www.codeproject.com

It should probably be more like this:

// Automatically generated from source file: ../../Relative/Path/MyParserSourceFile.tpg
// By TinyPG v1.3 available at http://github.com/SickheadGames/TinyPG

Documentation

Generate documentation which explains how it all works and includes the latest features.

We should start by using most of the original article 'A Tiny Parser Generator v1.2' on CodeProject.

We should then add the new features to it.

Need to figure out how to best package these docs and easily launch them from the editor.

problem with grammar

i have this Grammar: Grammar

i have the problem that the code generator generates 2 same IDENTIFIER switch cases. When i delete the empty one it parses not correctly.

"fileName" argument to Parser.Parse causes problems in the IDE

First of all, thanks so much for putting this up on GitHub! I just discovered TinyPG and it looks like a great tool.

I compared to the code from TinyPG 1.3 on CodeProject and your version on GitHub. It looks like you added a new "string fileName" argument to the Parser.Parse methods in the C# templates. This seems like a really good idea; however, it's causing problems in the TinyPG IDE. When I push F5 (Generage&Run), I get an exception.

I traced the error down to line 157 in Compiler.cs:

object treeinstance = parsertype.InvokeMember("Parse", BindingFlags.InvokeMethod, null, parserinstance, new object[] { input });

The problem is that the parser no longer contains a .Parse method that only takes one parameter. To get things working, I added a dummy filename argument to line 157:

object treeinstance = parsertype.InvokeMember("Parse", BindingFlags.InvokeMethod, null, parserinstance, new object[] { input, "DummyFileName" });

I think a better solution though would be to add an overload for .Parse that only takes one parameter, the input string to parse. A lot of people will probably use TinyPG to generate parsers for interactive use, where there is no filename.

Thanks again for your work on this project!

Console outputs not displayed when running from command line

When running TinyPG with a file parameter
cmd.exe : NO console output displayed.
VS2010 : console output displayed in output window.

I found/tried this solution on stackOverflow.
http://stackoverflow.com/questions/8047741/attachconsole-1-but-console-writeline-wont-output-to-parent-command-prompt

It causes the reverse behavior
cmd.exe : console output displayed.
VS2010 : console output displayed in a cmd.exe console which close upon completion. output window is blank.

Setting TinyPG project to "Console application" instead of "Window application" seems to fix the problem :
output are displayed in VS2010/batch/cmd.exe correctly.

TinyPG.csproj
-    <OutputType>WinExe</OutputType>
+    <OutputType>Exe</OutputType>

But i am not totaly sure/aware of the consequences.

TinyPG doesn't properly parse keyword based grammar

I could be wrong, but I'm pretty sure this is a bug in TinyPG. It isn't able to properly parse this grammar:

EOF -> @"^\s_$";
[Skip] WHITESPACE -> @"\s+";
LIST -> "LIST";
END -> "END";
IDENTIFIER -> @"[a-zA-Z_][a-zA-Z0-9_]_";
Expr -> LIST IDENTIFIER+ END;
Start -> (Expr)+ EOF;
The resulting parser cannot parse this:

LIST foo BAR Baz END
because it greedily lexes END as an IDENTIFIER, instead of properly as the END keyword.

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.