Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error field too small #2

Open
Mumin opened this issue Nov 21, 2013 · 3 comments
Open

Error field too small #2

Mumin opened this issue Nov 21, 2013 · 3 comments

Comments

@Mumin
Copy link

Mumin commented Nov 21, 2013

First of all congrats for this cool peg.js editor!

Having worked with it for 3 days now, I suggest

  • to make the height of the yellow error area larger because errors in larger grammars go outside of view and not scrolling availbale there
  • the output area does not support copy&paste, which would be helpful
  • It should be possible to switch between multiple grammar projects

best Mumin

@arcanis
Copy link
Owner

arcanis commented Nov 23, 2013

Thanks ! I will try to fix the issue about the error message height soon. It's indeed a problem.

Copy / paste in the output area seems broken, I will give a look, but it could be an issue with Codemirror.

How would you imagine a 'multiple grammar project'? I usually only need a single file, but I'm open to suggestions.

@Mumin
Copy link
Author

Mumin commented Nov 23, 2013

Thanks for coming back on my issues.

How about using the left side to show URLs of the last x grammars (in latest vresion) one has created? At the moment you have to take care not to forget the URLs (I guess there is no easy way to find your grammar again if you don't know its URL). I have found it useful to test out special constructs in a separate grammar while working on another larger grammar).

In the meantime I found another annoying issue: I am on Mac using a trackpad. Looking around in the output area and using a wipe gesture to the left, I have lost my work at least four times. Problem here is that the editor switches back to the former grammar version without a confirm dialog or so, i.e. what you did in the current (still not stored version) is lost then.

How does the Export feature work? It shows a small dialog with module.export. Of course I know what that means in node but I would expect to enter a file name for the export file?

Finally, I am still not experienced enough with peg.js but is there a chance to extract and show more debug information during grammar development? For me it would be of great help to see a kind rule trace, i.e. which rules where applied in which sequence before a parse error.

Anyway, I really love your editor. Would be great if it becomes a kind of IDE for peg.js.

best Mumin

@arcanis
Copy link
Owner

arcanis commented Nov 23, 2013

  • Yes, that should be possible, I'll look at it
  • Hm I see. I'll ask for confirmation when there is unsaved work before leaving the page.
  • The export feature is the same one than in the PEG.js demo page : the prompt is asking for the export symbol of the parser. On node it's usually module.export so you can require it, but in a browser you probably want something like window.MySuperParser. The file will then be downloaded as a file named "parser.js".
  • I'm not sure, but I think that there isn't much more debug informations in PEG.js (I've seen this meta-issue which may interest you). I was thinking to display the faulty input line in red, but I probably can't do much more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants