Re: [Pharo-users] Smacc question

2017-03-27 Thread Stephane Ducasse
I’m puzzled. I have the same rules in two grammars one parse a sequence and the other not. self parse: ‘payable internal' _FunctionTypeNameOptions : | FunctionTypeNameOptions ; FunctionTypeNameOptions : FunctionTypeNameOption 'option' {{}} | FunctionTypeNameOptions FunctionTypeNameOption 'option'

Re: [Pharo-users] Smacc question

2017-03-27 Thread Stephane Ducasse
I’m puzzled. I have the same rules in two grammars one parse a sequence and the other not. self parse: ‘payable internal' _FunctionTypeNameOptions : | FunctionTypeNameOptions ; FunctionTypeNameOptions : FunctionTypeNameOption 'option' {{}} | FunctionTypeNameOptions FunctionTypeNameOption

Re: [Pharo-users] Smacc question

2017-03-27 Thread Thierry Goubier
Le 27/03/2017 à 21:12, Stephane Ducasse a écrit : what was strange is that this version : \s+; %root MultiListObject; %prefix XPML; modifiers_opt : | modifiers ; modifiers : modifier 'modifier' {{}} | modifiers modifier 'modifier' {{}} ; modifier : "public" 'token' {{Modifier}} | "protected" '

Re: [Pharo-users] Smacc question

2017-03-27 Thread Stephane Ducasse
what was strange is that this version : \s+; %root MultiListObject; %prefix XPML; modifiers_opt : | modifiers ; modifiers : modifier 'modifier' {{}} | modifiers modifier 'modifier' {{}} ; modifier : "public" 'token' {{Modifier}} | "protected" 'token' {{Modifier}} | "private" 'token' {{Modifier}}

Re: [Pharo-users] Smacc question

2017-03-27 Thread Thierry Goubier
Hi Stéphane, can you send the complete grammar? The %root directive should have no impact on parse failures. Thierry Le 27/03/2017 à 18:40, Stephane Ducasse a écrit : Apparently there is an interaction with the root directives. On Mon, Mar 27, 2017 at 6:34 PM, Stephane Ducasse mailto:stepha

Re: [Pharo-users] Smacc question

2017-03-27 Thread Stephane Ducasse
Apparently there is an interaction with the root directives. On Mon, Mar 27, 2017 at 6:34 PM, Stephane Ducasse wrote: > Now I tried to hook modifier logic to test and I cannot have two modifiers. > I thought that > > modifiers > : modifier 'modifier' > | modifiers modifier 'modifier' > ; > allow

Re: [Pharo-users] Smacc question

2017-03-27 Thread Stephane Ducasse
Now I tried to hook modifier logic to test and I cannot have two modifiers. I thought that modifiers : modifier 'modifier' | modifiers modifier 'modifier' ; allows one to have 'public static' but apparently not so I'm totally confused. On Mon, Mar 27, 2017 at 6:30 PM, Stephane Ducasse wrote: >

[Pharo-users] Smacc question

2017-03-27 Thread Stephane Ducasse
Hi john I'm learning smacc as a challenge :) I read a review the tutorial that we extracted form your doc. I have the following expression FunctionTypeName = 'function' TypeNameList ( 'internal' | 'external' | 'constant' | 'payable' )* ( 'returns' TypeNameList )? and I started to handle the 'in