Git Product home page Git Product logo

selenscript's People

Contributors

avril112113 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thomasio101

selenscript's Issues

Grammar railroad diagram

I'm looking at lpeg grammars and it's variants to generate an EBNF understood by https://www.bottlecaps.de/rr/ui using a lpeg/re varaint to do the transformation (see also here edubart/nelua-lang#190), bellow is the output for libs/repreprocess/grammar.relabel .

Start ::=
	chunk ( '!' .  |  ( . *  )  )
chunk ::=
	( statement +  |   )
statement ::=
	( comment  |  if  |  block  |  include  |  define  |  source  |  #xA ) Cl
comment ::=
	Sp * "//" ( '!' #xA . ) *   |  Sp * "/*" ( '!' "*/" . ) *  "*/"
if ::=
	( directive_if Cl chunk elseif ? ( directive_endif  |   ) )
elseif ::=
	( directive_elseif Cl chunk ( Cl ( elseif  |  else ) ) ? )
else ::=
	directive_else Cl chunk
block ::=
	( directive_block_start Cl chunk ( directive_block_end  |   ) )
include ::=
	( directive_include Cl )
define ::=
	( directive_define Cl )
source ::=
	'!' directive '!' "//" '!' "/*" ( '!' #xA . ) +
directive ::=
	directive_if  |  directive_elseif  |  directive_else  |  directive_endif  |  directive_block_start  |  directive_block_end  |  directive_include  |  directive_define  |  directive_unknown
directive_if ::=
	"#if" Sp + WORD ( Sp * "==" Sp * WORD  |   )
directive_elseif ::=
	"#elseif" Sp + WORD ( Sp * "==" Sp * WORD  |   )
directive_else ::=
	"#else"
directive_endif ::=
	"#endif"
directive_block_start ::=
	"#block" Sp + WORD
directive_block_end ::=
	"#endblock"
directive_include ::=
	"#include" Sp + WORD
directive_define ::=
	"#define" Sp + WORD ( Sp + WORD  |   )
directive_unknown ::=
	"#" ( WORD ( '!' #xA . ) * )
Cl ::=
	Sp * #xA ?
Sp ::=
	' '  |  #x9 //%esc_t
WORD ::=
	[a-zA-Z_] [a-zA-Z_0-9] *
HASH ::=
	"#"

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.