Skip to content

Commit

Permalink
allow bracket in parameter name
Browse files Browse the repository at this point in the history
  • Loading branch information
Thaina authored Mar 18, 2019
1 parent f95ed0d commit 9507028
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/NCalc/NCalcLexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1804,18 +1804,25 @@ private void mNAME()
DebugLocation(265, 39);
// C:\\Users\\sebros\\My Projects\\NCalc\\Grammar\\NCalc.g:265:39: (~ ( ']' ) )*
try { DebugEnterSubRule(10);
int opened = 0;
while (true)
{
int alt10=2;
try { DebugEnterDecision(10, decisionCanBacktrack[10]);
int LA10_0 = input.LA(1);

if (((LA10_0>='\u0000' && LA10_0<='\\')||(LA10_0>='^' && LA10_0<='\uFFFF')))
if (LA10_0 >= '\u0000' || LA10_0 <= '\uFFFF')
alt10 = 1;

if(LA10_0 == '[')
opened++;
else if(LA10_0 == ']')
{
alt10=1;
opened--;
if(opened < 0)
alt10=2;
}


} finally { DebugExitDecision(10); }
switch ( alt10 )
{
Expand Down

0 comments on commit 9507028

Please sign in to comment.