Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > pl.comp.programming > #32351
| From | AK <nobody@nowhere.net> |
|---|---|
| Newsgroups | pl.comp.programming |
| Subject | Re: Stroustrup o C++ |
| Date | 2019-01-14 10:48 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <q1hlu3$d1l$1@gioia.aioe.org> (permalink) |
| References | (4 earlier) <q1f5pu$1b58$1@gioia.aioe.org> <ab584a3e-a9a1-47e0-99d6-d60834fee098@googlegroups.com> <q1fpaf$4a8$1@gioia.aioe.org> <e7e02125-c966-4ed5-a78d-dc52b8fbb349@googlegroups.com> <q1hjfj$1ug$1@gioia.aioe.org> |
On 2019-01-14 10:06, AK wrote:
> No bez jaj. Przeszkadzaja, gdyz tak wlasciwie nie dzialaja
> w sizeof, a jedynie wprowadzaja w blad/konfuzje (8 zamiast 9)
> developerow.
> Nie powinny byc w sizeof dopuszczalne, tak jak nie jest
> dopuszczalne dowolne wyrazenie (a jedynie consts expr) w
> deklaracji rozmiaru tablicy, czy w dyrektywach preprocesora
Mozna by to wprowadzic juz na poziomie gramatyki np. tak:
Jest (ANSI-C/C99):
/* (6.5.3) */
unary_expression :
postfix_expression ${action Actions.token0} |
'++' unary_expression ${action Actions.prefix_increment_expression} |
'--' unary_expression ${action Actions.prefix_decrement_expression} |
/* unary_operator cast_expression */
'&' cast_expression ${action Actions.address_expression} |
'*' cast_expression ${action Actions.indirection_expression} |
'+' cast_expression ${action Actions.unary_plus_expression} |
'-' cast_expression ${action Actions.unary_minus_expression} |
'~' cast_expression ${action Actions.bitwise_NOT_expression} |
'!' cast_expression ${action Actions.logical_NOT_expression} |
'sizeof' unary_expression ${action Actions.sizeof_expression} |
'sizeof' '(' type_name ')' ${action Actions.sizeof_type_expression} ;
Moglo by byc w rodzaju:
/* (6.5.3) */
sizeof_expression :
postfix_expression ${action Actions.token0} |
/* unary_operator cast_expression */
'&' cast_expression ${action Actions.address_expression} |
'*' cast_expression ${action Actions.indirection_expression} |
'+' cast_expression ${action Actions.unary_plus_expression} |
'-' cast_expression ${action Actions.unary_minus_expression} |
'~' cast_expression ${action Actions.bitwise_NOT_expression} |
'!' cast_expression ${action Actions.logical_NOT_expression} |
'sizeof' sizeof_expression ${action Actions.sizeof_expression} |
'sizeof' '(' type_name ')' ${action Actions.sizeof_type_expression} ;
/* (6.5.3) */
unary_expression :
sizeof_expression ${action Actions.token0} |
'++' unary_expression ${action Actions.prefix_increment_expression} |
'--' unary_expression ${action Actions.prefix_decrement_expression} ;
PS: Noi?
PS1: Nie wiem czy by to nie zabuzylo priorytetu operatorow (nie chce mi
sie sprawdzac, ale na 90% nie), ale nawet gdyby, to zawsze to mozna
uskutecznic semantycznie (juz w AST).
AK
Back to pl.comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Stroustrup o C++ godek.maciek@gmail.com - 2019-01-12 02:46 -0800
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-12 17:52 +0100
Re: Stroustrup o C++ szykcech@gmail.com - 2019-01-12 10:37 -0800
Re: Stroustrup o C++ Wojciech Muła <wojtek.mula@gmail.com> - 2019-01-12 11:48 -0800
Re: Stroustrup o C++ A S <asta@evbox.pl> - 2019-01-13 06:13 +0100
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-13 12:01 +0100
Re: Stroustrup o C++ Wojciech Muła <wojtek.mula@gmail.com> - 2019-01-13 04:19 -0800
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-13 17:34 +0100
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-13 17:36 +0100
Re: Stroustrup o C++ Wojciech Muła <wojtek.mula@gmail.com> - 2019-01-14 00:37 -0800
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-14 10:06 +0100
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-14 10:48 +0100
Re: Stroustrup o C++ godek.maciek@gmail.com - 2019-01-14 01:49 -0800
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-14 11:04 +0100
Re: Stroustrup o C++ godek.maciek@gmail.com - 2019-01-14 02:41 -0800
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-14 13:22 +0100
Re: Stroustrup o C++ queequeg@trust.no1 (Queequeg) - 2019-01-18 13:05 +0000
Re: Stroustrup o C++ Wojciech Muła <wojtek.mula@gmail.com> - 2019-01-14 07:33 -0800
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-14 17:42 +0100
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-14 17:48 +0100
Re: Stroustrup o C++ Wojciech Muła <wojtek.mula@gmail.com> - 2019-01-14 10:53 -0800
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-15 15:02 +0100
Re: Stroustrup o C++ Wojciech Muła <wojtek.mula@gmail.com> - 2019-01-15 13:56 -0800
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-16 00:36 +0100
Re: Stroustrup o C++ Wojciech Muła <wojtek.mula@gmail.com> - 2019-01-18 16:08 -0800
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-19 02:18 +0100
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-13 12:10 +0100
Re: Stroustrup o C++ AK <nobody@nowhere.net> - 2019-01-13 12:13 +0100
Re: Stroustrup o C++ queequeg@trust.no1 (Queequeg) - 2019-01-18 12:50 +0000
Re: Stroustrup o C++ queequeg@trust.no1 (Queequeg) - 2019-01-18 15:45 +0000
Re: Stroustrup o C++ Wojciech Muła <wojtek.mula@gmail.com> - 2019-01-18 15:59 -0800
Re: Stroustrup o C++ queequeg@trust.no1 (Queequeg) - 2019-01-19 11:03 +0000
Re: Stroustrup o C++ Sebastian Biały <heby@poczta.onet.pl> - 2019-01-19 21:18 +0100
Re: Stroustrup o C++ fir <profesor.fir@gmail.com> - 2019-01-20 04:04 -0800
Re: [OT] Stroustrup o C++ Sebastian Biały <heby@poczta.onet.pl> - 2019-01-20 17:05 +0100
Re: [OT] Stroustrup o C++ fir <profesor.fir@gmail.com> - 2019-01-20 10:25 -0800
Re: [OT] Stroustrup o C++ queequeg@trust.no1 (Queequeg) - 2019-01-20 20:56 +0000
Re: [OT] Stroustrup o C++ queequeg@trust.no1 (Queequeg) - 2019-01-20 20:54 +0000
Re: [OT] Stroustrup o C++ fir <profesor.fir@gmail.com> - 2019-01-20 13:40 -0800
Re: Stroustrup o C++ queequeg@trust.no1 (Queequeg) - 2019-01-20 20:49 +0000
Re: Stroustrup o C++ Sebastian Biały <heby@poczta.onet.pl> - 2019-01-20 22:55 +0100
Re: Stroustrup o C++ queequeg@trust.no1 (Queequeg) - 2019-01-21 10:42 +0000
Re: Stroustrup o C++ Borneq <borneq@antyspam.hidden.pl> - 2019-01-14 16:38 +0100
csiph-web