Mercurial > urweb
comparison src/urweb.grm @ 2010:403f0cc65b9c
New lessSafeFfi
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 02 May 2014 19:19:09 -0400 |
parents | 799be3911ce3 |
children | afeeabdcce77 |
comparison
equal
deleted
inserted
replaced
2009:799be3911ce3 | 2010:403f0cc65b9c |
---|---|
1 (* Copyright (c) 2008-2012, Adam Chlipala | 1 (* Copyright (c) 2008-2014, Adam Chlipala |
2 * All rights reserved. | 2 * All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are met: | 5 * modification, are permitted provided that the following conditions are met: |
6 * | 6 * |
363 | STRING of string | INT of Int64.int | FLOAT of Real64.real | CHAR of char | 363 | STRING of string | INT of Int64.int | FLOAT of Real64.real | CHAR of char |
364 | SYMBOL of string | CSYMBOL of string | 364 | SYMBOL of string | CSYMBOL of string |
365 | LPAREN | RPAREN | LBRACK | RBRACK | LBRACE | RBRACE | 365 | LPAREN | RPAREN | LBRACK | RBRACK | LBRACE | RBRACE |
366 | EQ | COMMA | COLON | DCOLON | DCOLONWILD | TCOLON | TCOLONWILD | DOT | HASH | UNDER | UNDERUNDER | BAR | 366 | EQ | COMMA | COLON | DCOLON | DCOLONWILD | TCOLON | TCOLONWILD | DOT | HASH | UNDER | UNDERUNDER | BAR |
367 | PLUS | MINUS | DIVIDE | DOTDOTDOT | MOD | AT | 367 | PLUS | MINUS | DIVIDE | DOTDOTDOT | MOD | AT |
368 | CON | LTYPE | VAL | REC | AND | FUN | MAP | UNIT | KUNIT | CLASS | 368 | CON | LTYPE | VAL | REC | AND | FUN | MAP | UNIT | KUNIT | CLASS | FFI |
369 | DATATYPE | OF | 369 | DATATYPE | OF |
370 | TYPE | NAME | 370 | TYPE | NAME |
371 | ARROW | LARROW | DARROW | STAR | SEMI | KARROW | DKARROW | BANG | 371 | ARROW | LARROW | DARROW | STAR | SEMI | KARROW | DKARROW | BANG |
372 | FN | PLUSPLUS | MINUSMINUS | MINUSMINUSMINUS | DOLLAR | TWIDDLE | CARET | 372 | FN | PLUSPLUS | MINUSMINUS | MINUSMINUSMINUS | DOLLAR | TWIDDLE | CARET |
373 | LET | IN | 373 | LET | IN |
530 | sqlexps of exp list | 530 | sqlexps of exp list |
531 | fsets of (con * exp) list | 531 | fsets of (con * exp) list |
532 | enterDml of unit | 532 | enterDml of unit |
533 | leaveDml of unit | 533 | leaveDml of unit |
534 | 534 |
535 | ffi_mode of ffi_mode | |
536 | ffi_modes of ffi_mode list | |
537 | |
535 | 538 |
536 %verbose (* print summary of errors *) | 539 %verbose (* print summary of errors *) |
537 %pos int (* positions *) | 540 %pos int (* positions *) |
538 %start file | 541 %start file |
539 %pure | 542 %pure |
643 s (VIEWleft, RBRACEright))]) | 646 s (VIEWleft, RBRACEright))]) |
644 | COOKIE SYMBOL COLON cexp ([(DCookie (SYMBOL, cexp), s (COOKIEleft, cexpright))]) | 647 | COOKIE SYMBOL COLON cexp ([(DCookie (SYMBOL, cexp), s (COOKIEleft, cexpright))]) |
645 | STYLE SYMBOL ([(DStyle SYMBOL, s (STYLEleft, SYMBOLright))]) | 648 | STYLE SYMBOL ([(DStyle SYMBOL, s (STYLEleft, SYMBOLright))]) |
646 | TASK eapps EQ eexp ([(DTask (eapps, eexp), s (TASKleft, eexpright))]) | 649 | TASK eapps EQ eexp ([(DTask (eapps, eexp), s (TASKleft, eexpright))]) |
647 | POLICY eexp ([(DPolicy eexp, s (POLICYleft, eexpright))]) | 650 | POLICY eexp ([(DPolicy eexp, s (POLICYleft, eexpright))]) |
651 | FFI SYMBOL ffi_modes COLON cexp([(DFfi (SYMBOL, ffi_modes, cexp), s (FFIleft, cexpright))]) | |
648 | 652 |
649 dtype : SYMBOL dargs EQ barOpt dcons (SYMBOL, dargs, dcons) | 653 dtype : SYMBOL dargs EQ barOpt dcons (SYMBOL, dargs, dcons) |
650 | 654 |
651 dtypes : dtype ([dtype]) | 655 dtypes : dtype ([dtype]) |
652 | dtype AND dtypes (dtype :: dtypes) | 656 | dtype AND dtypes (dtype :: dtypes) |
2265 | 2269 |
2266 sqlagg : AVG ("avg") | 2270 sqlagg : AVG ("avg") |
2267 | SUM ("sum") | 2271 | SUM ("sum") |
2268 | MIN ("min") | 2272 | MIN ("min") |
2269 | MAX ("max") | 2273 | MAX ("max") |
2274 | |
2275 ffi_mode : SYMBOL (case SYMBOL of | |
2276 "effectful" => Effectful | |
2277 | "benignEffectful" => BenignEffectful | |
2278 | "clientOnly" => ClientOnly | |
2279 | "serverOnly" => ServerOnly | |
2280 | _ => (ErrorMsg.errorAt (s (SYMBOLleft, SYMBOLright)) "Invalid FFI mode"; Effectful)) | |
2281 | SYMBOL STRING (case SYMBOL of | |
2282 "jsFunc" => JsFunc STRING | |
2283 | _ => (ErrorMsg.errorAt (s (SYMBOLleft, SYMBOLright)) "Invalid FFI mode"; Effectful)) | |
2284 | |
2285 ffi_modes : ([]) | |
2286 | ffi_mode ffi_modes (ffi_mode :: ffi_modes) |