wenyan icon indicating copy to clipboard operation
wenyan copied to clipboard

Is there a plan to provide a language spec?

Open nanmu42 opened this issue 4 years ago • 12 comments

Hi,

It would be nice if the language specification can be provided, for example: https://golang.org/ref/spec, so that people may implement/port the language to the backend they like.

Very impressive work, I enjoy it a lot!

nanmu42 avatar Dec 17 '19 05:12 nanmu42

agree @nanmu42 , I want to implement other language, does it have doc or something like it?

freddy5566 avatar Dec 17 '19 06:12 freddy5566

Hi nanmu42 and jamfly, Thanks! Indeed writing the spec is among my top priorities, I’m working on it and you can expect it in a couple of days. Will update here when done. :-)

LingDong- avatar Dec 17 '19 06:12 LingDong-

Brilliant! Looking forward to it. :+1:

nanmu42 avatar Dec 17 '19 06:12 nanmu42

Great work!

das6ng avatar Dec 19 '19 15:12 das6ng

Well done... possible towards a more practical one not so toyish like Rust? ;)

FrankHB avatar Dec 21 '19 23:12 FrankHB

if_statement                : IF if_expression '者' statement+ (ELSE statement+)? FOR_IF_END ;

Should statement+ be statement* ?

cuixiping avatar Jan 11 '20 06:01 cuixiping

@cuixiping Good catch! @jiangzoi fix this XD

LingDong- avatar Jan 11 '20 14:01 LingDong-

if_statement                : IF if_expression '者' statement+ (ELSE statement+)? FOR_IF_END ;

Should statement+ be statement* ?

Thank you for proposing this suggestion. Let's see what will happen if statement+ is replaced by statement*: 若「滿足條件」者。也 Which does not make much sense from reading. That is why we consider to put statement+ here.

jiangzoi avatar Jan 11 '20 18:01 jiangzoi

@jiangzoi

若「滿足條件」者。
若非
      do something
也

and why is statement * in for statements but if statement? They should not be different.

cuixiping avatar Jan 12 '20 02:01 cuixiping

Now available on https://wy-lang.org/spec

antfu avatar Feb 02 '20 16:02 antfu

Is this completed? I find the grammar summary, but nothing about semantics, nor any rules of conformance.

FrankHB avatar Feb 02 '20 19:02 FrankHB

  • [x] 1
  • [x] 2
  • [x] 3
  • [x] ok1
  • [x] ok2

fe26game avatar Nov 02 '22 13:11 fe26game